Just started programming in C, and so far, it has been great...
However, I am running into a syntax error.
Code:
#include <stdio.h>
int main (void)
{
int num1;
int num2;
int sum;
int product;
sum = num1 + num2;
product = (num1 * num2);
printf("Enter your numbers!\n");
scanf("%d", &num1);
scanf("%d", &num2);
printf("Your sum is: %d", sum);
if (num1 > num2)
{
printf("\nThe first number is greater than the second one!\n");
}
if (num1 < num2)
{
printf("\nThe first number is less than the second number!");
}
char choice;
printf("Would you like to multiply the two numbers?");
scanf("Yes");
scanf("No");
if (choice == "Yes") {
printf("The product of the two numbers is... \n%d", product);
}
}
It says that there is a "comparison between point and integer" on the line with the bold text.
Can you correct my issue? I am making a basic calculator.