Author Topic: I am making a simple PI calculator and need help. Im new  (Read 271 times)

Offline f0rze

  • Single posting newcomer
  • *
  • Posts: 1
I am making a simple PI calculator and need help. Im new
« on: March 17, 2017, 05:24:48 pm »
Well i need some help with this program.

#include <iostream>
#define PI 3.14

int main()

{
     //Simple PI Calculator
   
    float radius;
    float no;
    float yes;


    std::cout << "Enter circle radius: ";

    std::cin >> radius;
        float circle_area = PI * radius;

    std::cout << "Circle's radius: " << circle_area << std::endl;


    std::cout << "Would you like to enter another PI calculation?" << std::endl;
   
        return 0;
}

Can some one help with this? I want it so if you say yes it will pretty much start the program all over again. And if you press no it will close it.

Online Commaster

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: I am making a simple PI calculator and need help. Im new
« Reply #1 on: March 17, 2017, 06:26:25 pm »

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7159
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: I am making a simple PI calculator and need help. Im new
« Reply #2 on: March 18, 2017, 09:10:00 am »
Topi clocked because it violates our forum rules !