任何帮助都会很棒!
#include <stdio.h>
#define pi 3.14159
int main()
{
float r;
char PI;
/*Program for circumference. */
printf(" This is a program that will calculate circumference.\n");
printf("Please put in your radius.\n");
scanf("%f", &r);
printf("Please input PI\n");
PI = getchar();
}
{
if {(char != PI || 3.14);
printf("Incorect value\n");
}
else {
printf("Thank you, the circumference is now.\n");
printf("%f", (r) * pi *2);
}
return 0;
}
我试图找出这个错误,我肯定已经搜索过了,但我的具体问题并没有真正弹出。如果有帮助,就在“if”语句开始之前。我可能使用了太多的“{”吗?