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
#include<stdio.h>;
#include<conio.h>;

//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
_getch();
}//end main

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Contact Us

Stay updated for more codes if we u want any code write us by commenting below or email us.
If you want to hire us for your semester project email us at above given email or call or message
Email: 14bscswjaved@seecs.edu.pk
Phone no: 0308-8109708

Popular Post

Powered by Blogger.

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