Write a QBASIC program to take input of radius from the user. Calculate and
display Area and Circumference of a circle with a proper message. [10M]
Formula
1. Area = 3.14 * radius * radius
2. Circumference = 2 * 3.14 * radius
Answers
Answered by
0
Answer:
#include<stdio.h>
void main()
{
int r,Area,Circumference;
printf (" Please enter the radius of the circle\n");
scanf ("%d",&r);
Area=3.14*r*r;
Circummference=2*3.14*r;
printf("The Area of the circle is given by %d sq.metre and the circumference is given by %d metres\n",&Area,&Circumference);
}
INPUT:
Please enter the radius of the circle
2
OUTPUT:
The Area of the circle is given by 12.56 sq.metre and the circumference is given by 12.56 metres
Similar questions
Economy,
2 months ago
Math,
2 months ago
Computer Science,
2 months ago
Social Sciences,
5 months ago
Hindi,
5 months ago
Physics,
11 months ago
Physics,
11 months ago