#include<stdio.h>
#include<conio.h>
void main()
{
float r, area;
char ch = 'y';
do
{
system("cls");
printf("Enter the radius of the circle -: ");
scanf("%f", &r);
area = 3.14 * r * r;
printf("The area of the circle is -: %f", area);
printf("\n");
printf("Do u want to try again (y/n) -: ");
scanf("%c", &ch);
getch();
}
while(ch == 'y' || ch == 'Y');
getch();
}
Harshit_4 0 Newbie Poster
Reverend Jim 4,968 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
charlottegracie 0 Newbie Poster
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.