Friday, 20 June 2014
Program to calculate the area and circumference of a circle using C + +
Friend, after we know about concepts and notation algorithm, so it's good we immediately try it on your PC or Laptop our respective companions.The steps are as follows:
1. Prepare your PC or Laptop friend
2. Water, thirsty companions fear ... (hehe)
3. Open application programming friend, here I am using Turbo C + +
4. Re-type or copy and paste the code below into a worksheet friend
/ / Program to Calculate Area and Circumference Circle
# Include <iostream>
void main ()
{
int r;
float L;
float K;
float phi = 3:14;
cout << "Calculating Area and Circumference Lingakaran!" << endl;
cout << endl;
cout << "Enter the radius of the Value =";
cin >> r;
L = pi * r * r;
K = 2 * pi * r;
cout << "Result Area of the Circle =" << L << endl;
cout << "The result Roving Circle =" << K;
}
5. Runing programs
6. Done
Labels:
Programming algorithm
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment