1. ## More qusetions...

I seem to be asking alot of questions but C++ is fun ! I was wandering how I could get my program to exit whenever 7 is entered and I was wandering about how I would clear the screen when the user wnats to do another calculation.

Code:
```#include <iostream>

double Subtract();
double Multiply();
double Divide();
double CircleArea();
double CircleCircumference();

int main()
{

{

//A descision is then made hear depending on what the user entered
case 1: std::cout << "\nThe two numbers added together equal: " << Add();
break;

case 2: std::cout << "\nThe second number subtracted from the first number equals: " << Subtract();
break;

case 3: std::cout << "\nThe first number multiplied by the second equals: " << Multiply();
break;

case 4: std::cout << "\nThe first number divided by the second equals: " << Divide();
break;

case 5: std::cout << "\nThe circle's area is: " << CircleArea();
break;

case 6: std::cout << "\nThe circle's circumference is: " << CircleCircumference();
break;

}

std::cin.get();
return 0;
}

{

std::cout << "2.Subtract\n";
std::cout << "3.Multiply\n";
std::cout << "4.Divide\n";
std::cout << "5.Circle Area\n";
std::cout << "6.Circle Circumference\n";
std::cout << "7.Exit\n\n";

std::cout << "What would you like to do? ";

}

{

std::cout << "\nWhat is the first number: ";
std::cin >> FirstNumber;
std::cin.ignore(80,'\n');

std::cout << "What is the second number: ";
std::cin >> SecondNumber;
std::cin.ignore(80,'\n');

}

//Function Subtract code starts here
double Subtract()
{

std::cout << "\nWhat is the first number: ";
std::cin >> FirstNumber;
std::cin.ignore(80,'\n');

std::cout << "What number would you like to take away from the first number: ";
std::cin >> SecondNumber;
std::cin.ignore(80,'\n');

}

//Function Multiply code starts here
double Multiply()
{

std::cout << "\nWhat is the first number: ";
std::cin >> FirstNumber;
std::cin.ignore(80,'\n');

std::cout << "What do you want to multiply the first number by: ";
std::cin >> SecondNumber;
std::cin.ignore(80,'\n');

}

//Function Divide code starts here
double Divide()
{

std::cout << "\nWhat is the first number: ";
std::cin >> FirstNumber;
std::cin.ignore(80,'\n');

std::cout << "What do you want to divide the first number by: ";
std::cin >> SecondNumber;
std::cin.ignore(80,'\n');

}

//Function CircleArea code starts here
double CircleArea()
{

const double Pi = 3.141592654;

std::cout << "\nWhat is the circle's radius: ";
std::cin.ignore(80,'\n');

}

//Function CircleCircumference code starts here
double CircleCircumference()
{

const double Pi = 3.141592654;

std::cout << "\nWhat is the circle's radius: ";
std::cin.ignore(80,'\n');

}```

2. Originally Posted by ComDriver
I was wandering how I could get my program to exit whenever 7 is entered and I was wandering about how I would clear the screen when the user wnats to do another calculation.

Code:
```#include <iostream>

double Subtract();
double Multiply();
double Divide();
double CircleArea();
double CircleCircumference();

int main()
{

{

//A descision is then made hear depending on what the user entered
case 1: std::cout << "\nThe two numbers added together equal: " << Add();
break;

case 2: std::cout << "\nThe second number subtracted from the first number equals: " << Subtract();
break;

case 3: std::cout << "\nThe first number multiplied by the second equals: " << Multiply();
break;

case 4: std::cout << "\nThe first number divided by the second equals: " << Divide();
break;

case 5: std::cout << "\nThe circle's area is: " << CircleArea();
break;

case 6: std::cout << "\nThe circle's circumference is: " << CircleCircumference();
break;

}

std::cin.get();
return 0;
}```
Well your main doesn't look like it will keep prompting the user for choices until 7 is entered; looks like it will only prompt once and exit. So add
Code:
```case 7:
// Do nothing.
break;```
to the above switch() statement and the program exists.

Clearing the screen (console screen I assume) is a different story, depending on Windows or UNIX.

3. Clear the Screen

`while (1) { MenuAndMenuChoice() }`
```case 7: