0% found this document useful (0 votes)
32 views1 page

Coding Write A Program To Find The Area of A Circle

The document contains a coding challenge to write a program to calculate the area of a circle. The program defines PI as 3.14, uses scanf to input the diameter, calculates the area as PI * (diameter/2) * (diameter/2), prints the area to two decimal places, and returns 0. The test has 1 question, a duration of 20 minutes, and does not assign marks for correct or incorrect attempts.

Uploaded by

Pranay Mudhiraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Coding Write A Program To Find The Area of A Circle

The document contains a coding challenge to write a program to calculate the area of a circle. The program defines PI as 3.14, uses scanf to input the diameter, calculates the area as PI * (diameter/2) * (diameter/2), prints the area to two decimal places, and returns 0. The test has 1 question, a duration of 20 minutes, and does not assign marks for correct or incorrect attempts.

Uploaded by

Pranay Mudhiraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

FACE TCS Ninja - Coding_5

TEST CODE : TCS Ninja -


Coding_5
Total number of question : 1
Test duration (min) : 20 min
Correct attempt (mark) : NA
Wrong attempt (mark) : NA

CODING

Write a Program to find the area of a circle.

#include<stdio.h>
#define PI 3.14
int main()
{
float d, area;
scanf("%f",&d);
area=PI*(d/2)*(d/2);
printf("%0.2f", area);
return 0;
}

______________________________________________________________________________________________________
Focus Academy for Career Enhancement Page 1 of 1

You might also like