Hello everyone! I am having a bit of trouble in my online c++ class and I need some help drawing a flowchart for my design work. I already did the program without doing the flowchart (I haven't done one before and have no idea what to do). I could use some help creating a flowchart for this program. And are there any places where I can create flowcharts easily on the internet?
usingnamespace std;
int main ()
{
int selection = 0;
double input1(0.0);
double input2(0.0);
char indicator('n');
cout << "Welcome to Andrew's C++ Calculator" << endl;
cout << " Please enter two integers to find the sum, difference, product, quotient, square root, and power of " << endl;
for (;;)
{
cin >> input1;
cin >> input2;
cout << " The difference of " << input1 << " minus " << input2 << " is " << input1-input2 << endl;
cout << " The sum of " << input1 << " plus " << input2 << " is " << input1+input2 << endl;
cout << " The product of " << input1 << " times " << input2 << " is " << input1*input2 << endl;
cout << " The quotient of " << input1 << " divided by " << input2 << " is " << input1/input2 << endl;
cout << " The square root of " << input1 << " is " << sqrt( input1 );
cout << input2 << " to the 4th power is " << pow( input2,4 );
}
}
Umm...Line 18 is pretty bad especially since you never even put a break/return anywhere the program will never end.. Also for( ; ; ) looks tacky I would suggest a while loop and have a code to quit (eg if the user inputs a -99 or something then quit.
As for a flow chart you will put what the program does.
Ahhh okay sweet, thanks a ton. I do have another question because I have to do this for another program and I am freaking out as well. How would I go about making a chart for a program like this?