I am currently working on a program that takes one measurement of a circle and then gives the rest although i came across a problem while trying to make it loop back if you input an invalid number and my compiler keeps saying i have an error with were my while is placed ( I highlighted the important area in red!) thanks in advance you guys are the best!
#include <iostream>
#include <conio.h>
#include <cmath>
using namespace std;
double radius;
double circumfrence;
double area;
double diameter;
int radiusfunction();
int circumfrencefunction();
int areafunction();
int diameterfunction();
int main()
{
int choice;
do{
cout << "I can find measurments on a circle!" << endl;
cout << "which measurment do you have for me?" << endl;
cout << "1.) radius" << endl;
cout << "2.) circumfrence" << endl;
cout << "3.) area" << endl;
cout << "4.) diameter" << endl;
cin >> choice;
if (choice == 1){
radiusfunction();
}
else{
if (choice == 2){
circumfrencefunction();
}
else{
if (choice == 3){
areafunction();
}
else{
if (choice == 4){
diameterfunction();
}
else{
system("cls");
}while (choice != 1, 2, 3, 4);
}
}
}
}
return 0;
}
:icon_confused: