Posted by : Waqas Javed Wednesday, 24 December 2014

Allah Ditta wants a program that calculates and displays the area of a wheel given its radius. Use the constant value 3.14159 for π.

//area of wheel

//executing main program
void main()
//creating vars to store data
int i;
float j = 3.14159;

//get radius from user
printf("Enter the radius of circle:");
scanf("%d", &i);

//displaying and calculating area
printf("The area of wheel is: %f", (i*i)*j);

//for disabling automatic close off of program after execution of program
}//end main

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Powered by Blogger.

- Copyright © BSCS -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -