when i first started using code blocks i pressed the down arrow to get rid of the box at the bottom of the screen that tells you the errors in your code when you compile it.how do i get it back?
ok f2 worked but i have a question.why when i compile this program on dev c++ it works fin but when i compile it on code::blocks it says line 12 and 70 "system not declared in scope"...why?
#include <iostream>
usingnamespace std;
int main()
{
double a, b, answer;
int choice;
char again;
do{
system("CLS");
cout << "here are your options" << endl << endl;
cout << "1.Addition" << endl;
cout << "2.subtraction" << endl;
cout << "3.multiplication" << endl;
cout << "4.divison" << endl;
cout << "5.average calculator" << endl;
cout << "6.to quit" << endl;
cin >> choice;
switch(choice){
case 1:
cout << "enter two numbers you want to use(press enter after you enter each number): ";
cout << endl;
cin >> a >> b;
answer = a + b;
cout << "the answer is: " << a << " + " << b << " = " << answer << endl;
break;
case 2:
cout << "enter two numbers you want to use(press enter after you enter each number): ";
cout << endl;
cin >> a >> b;
answer = a - b;
cout << "the answer is: " << a << " - " << b << " = " << answer << endl;
break;
case 3:
cout << "enter two numbers you want to use(press enter after you enter each number): ";
cout << endl;
cin >> a >> b;
answer = a * b;
cout << "the answer is: " << a << " * " << b << " = " << answer << endl;
break;
case 4:
cout << "enter two numbers you want to use(press enter after you enter each number): ";
cout << endl;
cin >> a >> b;
answer = a / b;
cout << "the answer is: " << a << " / " << b << " = " << answer << endl;
break;
case 5:
cout << "please enter two numbers you want to find the average of" << endl;
cout << "be sure to press enter after each number" << endl;
cin >> a >> b;
answer = (a + b) /2;
cout << "the average of " << a << " and " << b << " is " << answer << endl;
break;
case 6:
cout << "thanks for using this calculator!" << endl;
system("pause");
return 0;
break;
}
cout << "would you like to restart(y or n)";
cin >> again;
}while(again == 'y' ||again == 'Y');
system("pause");
return 0;
}
okay thanks and can you please help me figure out a way to let the user in this program to enter however many numbers he wants to use.i want to do this by a loop but i cant figure that out.