Hi everyone. I am trying to do a simple program in C which reads two double numbers from the keyboard and displays the sum to the user. Even though the compiling is ok, the program doesn't run as expected. The code is:
What is wrong with this code?
int main (void)
double num1, num2, sum;
printf("Type in the first number: ");
printf("Type in the second number: ");
sum = num1 + num2;
printf("%f + %f = %f.", num1, num2, sum);
Thanks in advance!