Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Program: circulo.cc
- // Author: Yoan Pinzon
- // Date: Agosto 30, 2006
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- float radio, area, perimetro;
- const float pi = 3.141592653589793;
- cout << "Area y perimetro del circulo" << endl;
- cout << "============================" << endl;
- cout << "Entre el valor del radio= "; cin >> radio;
- area = pi * radio * radio;
- perimetro = 2 * pi * radio;
- cout.setf(ios::fixed);
- cout << setprecision(2) << endl;
- cout << "Area= " << area << endl;
- cout << "Perimetro= " << perimetro << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement