write the c program for the following. a) To display a welcome message. b)To accept the radius of a circle and to display its area
Answers
Answered by
0
Answer:
(a)
#include <stdio.h>
int main()
{
printf("Hello and welcome here");
return 0;
}
(b)
#include <stdio.h>
#include <conio.h>
#define PI 3.141
int main()
{
float radius, area;
printf("Enter radius of circle\n");
scanf("%f", & radius);
area = PI * radius * radius;
printf("Area of circle : %0.4f\n", area);
return 0;
}
Similar questions
Math,
4 days ago
Social Sciences,
4 days ago
Computer Science,
9 days ago
Math,
9 days ago
Science,
9 months ago
Math,
9 months ago