Computer Science, asked by thisisbenny2002, 3 months ago

A basic program to calculate the circumference of a circle in machine language.​

Answers

Answered by mannat200891
0

Answer:

#include<stdio.h>

int main()

float radius, area;

printf("\nEnter the radius of Circle : ");

scanf("%d", &radius);

area = 3.14 * radius * radius;

printf("\nArea of Circle : %f", area);

return (0);

Answered by epikgamer
0

Answer:

#include <stdio.h>

#include<conio.h>

void main()

{

//Declaring variable radius, area and circumference of type int and float accordingly

int radius;

float  area,circum;

clrscr();

//printf() function to print value on output window

printf("\nEnter radius of circle: ");

//scanf() function to accept value from user from output window

scanf("%d",&radius);

area = 3.14 * radius * radius;

circum=2*3.14*radius;

//to print area and circumference of circle on output window

printf("\nArea of circle is: %f\nCircumference of circle:%f",area,circum);

getch();

}

Similar questions