Calcular area do circulo (C++)


SUBMITTED BY: kaiser722

DATE: Oct. 20, 2016, 11:01 p.m.

FORMAT: Text only

SIZE: 271 Bytes

HITS: 605

  1. //Calcular area do circulo
  2. #include <iostream>
  3. int main (){
  4. const float pi = 3.14159265F;
  5. int radius;
  6. float area;
  7. std::cout << "Qual o raio do circulo?";
  8. std::cin >> radius;
  9. area = pi * (radius * radius );
  10. std::cout << "A area e'" << area << std::endl;
  11. }

comments powered by Disqus