I'm a C# developer trying to learn C (followed by C++). I am going native, working on Ubuntu using vim as my text editor, and the Gnu C Compiler (gcc) to compile.
I'm trying to write a simple Celcius => Fahrenheit converter and I am getting the following error:
called object '0' is not a function
My code is as follows:
#include <stdio.h>
main()
{
for(int i = 0; i < 300; i+20)
{
int celcius = (5/9)(i-32);
printf("%d - %d \n", i, celcius);
}
}
I am compiling with this:
gcc FahrenheitToCelcius.c -std=c99
Could somebody point what I'm doing wrong here?
Thanks