User forums > Using Code::Blocks

I am making a simple PI calculator and need help. Im new

(1/1)

f0rze:
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.

Commaster:
Please read the CB Rules http://forums.codeblocks.org/index.php/topic,9996.0.html first.

jens:
Topi clocked because it violates our forum rules !

Navigation

[0] Message Index

Go to full version