#include<stdio.h>
#include<conio.h>
int main(){
float Area;
float r,h;
#define pi 3.41;
printf("enter the radius of the circle in centimeters\n");
scanf("%f",&r);
printf("enter the height of the cilinder in centimeters\n");
scanf("%f",&h);
Area=(pi*r*r)+(pi*r*h);
printf("THE AREA OF THE CILINDER IS:%f",&Area);
return 0;
getch();
}
eranga246
0
Newbie Poster
Recommended Answers
Jump to PostHere is the problem
printf("THE AREA OF THE CILINDER IS:%f",&Area);
Why u use &Area ? Its a refrence type.
Use only Area to solve this....
printf("THE AREA OF THE CILINDER IS:%f",Area);
All 4 Replies
kingsonprisonic
42
Posting Whiz in Training
deliezer
0
Newbie Poster
deliezer
0
Newbie Poster
gusano79
247
Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.