home
clear breadcrumbs
search
login
 
do while
#include "iostream" #include "math.h" using namespace std; int main() { int i{ 0 }; char choice{}; do { double circle_radius{}; cout << "Please enter circle radius" << endl; cin >> circle_radius; double circle_area{ 3.14 * circle_radius * circle_radius }; cout << "The circle area is " << circle_area << endl; cout << "Do you want to make an additional calculation? (Y/N)" << endl; cin >> choice; } while (choice == 'y' || choice == 'Y'); cout << "Goodbye" << endl; return 0; }