I am trying to define values for the variables "area" and "circ" but everytime I try to build the project I get this error:
Here is the code in question:Code:error C2059: syntax error : '='
If anyone can give me any suggestions I would appreciate it greatly. Thanks.Code:#include<stdio.h> #include<math.h> #define PI = 3.14159 int main() { int var1, two = 2; double radius, area, circ; printf("Program: Arithmetic Expressions\nAuthor: Stephen Haroldson\nEnter unsigned short int: "); scanf("%d", &var1); printf("The value of %d raised to the %d power is %f\n", two, var1, pow(two, var1)); printf("Enter unsigned short int: "); scanf("%1f", &radius); area = PI * radius * radius; circ = 2 * PI * radius; printf("A circle with a radius %d has a circumference of %f and an area of %f\n", radius, circ, area); return 0; }



1Likes
LinkBack URL
About LinkBacks


