May i know what is the problem of my C code ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

May i know what is the problem of my C code ?

https://code.sololearn.com/cpxjZog9Y5R2/?ref=app

16th Dec 2019, 1:08 AM
Adi Safwan
Adi Safwan - avatar
3 Answers
+ 3
no space here v #define VOLUME_SPHERE(r) printf should be printf("Please input the radius");
16th Dec 2019, 1:57 AM
Shen Bapiro
Shen Bapiro - avatar
+ 2
VOLUME_SPHERE (r) remove space regards
16th Dec 2019, 1:23 AM
Kacper Bąk
Kacper Bąk - avatar
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; }
17th Dec 2019, 4:12 AM
Ayush Khandelwal
Ayush Khandelwal - avatar