I'm not sure what's wrong here, obviously it all looks good to me, but it isn't working. Any help? The compiler errors are posted below the code
#include <stdio.h>
main ( )
{
int r = 10 ;
float _π = 3.14 ;
float volume = 4.0/3.0*π*r^3 ;
printf ("Volume of a sphere: %.2f\n" , volume) ;
return 0 ;
}
Scott-Deans-MacBook-Pro:documents scottdean$ gcc ~/documents/sphere.c
/Users/scottdean/documents/sphere.c: In function main:
/Users/scottdean/documents/sphere.c:7: error: stray \317 in program
/Users/scottdean/documents/sphere.c:7: error: stray \200 in program
/Users/scottdean/documents/sphere.c:8: error: stray \317 in program
/Users/scottdean/documents/sphere.c:8: error: stray \200 in program
/Users/scottdean/documents/sphere.c:8: error: invalid type argument of unary *
#include <stdio.h>
main ( )
{
int r = 10 ;
float _π = 3.14 ;
float volume = 4.0/3.0*π*r^3 ;
printf ("Volume of a sphere: %.2f\n" , volume) ;
return 0 ;
}
Scott-Deans-MacBook-Pro:documents scottdean$ gcc ~/documents/sphere.c
/Users/scottdean/documents/sphere.c: In function main:
/Users/scottdean/documents/sphere.c:7: error: stray \317 in program
/Users/scottdean/documents/sphere.c:7: error: stray \200 in program
/Users/scottdean/documents/sphere.c:8: error: stray \317 in program
/Users/scottdean/documents/sphere.c:8: error: stray \200 in program
/Users/scottdean/documents/sphere.c:8: error: invalid type argument of unary *