+ 1
May i know what is the problem of my C code ?
3 Answers
+ 3
no space here v
#define VOLUME_SPHERE(r)
printf should be
printf("Please input the radius");
+ 2
VOLUME_SPHERE (r)
remove space
regards
0
#include<stdio.h>
#define PI 3.14159
#define VOL(r) ((4/3) * PI * r * r *r)
int main() {
float r;
printf ("Please input the radius\n");
scanf("%f", &r);
printf ("The volume of sphere is :\n %f\n", VOL(r));
return 0;
}