i wrote the code but i cant get it to restart and i don't get the wile loop's i need a little help
i am using c++ 2008 express edition it says i have 3 erors but i dont see any and it wont tell me what they are
// Include the iostream library
#include <iostream>
//Use the standard namespace
usingnamespace std;
void main ( )
{
while (Guess= Forget_it)
{
// Declare the variables
float Number_1;
float Number_2;
float Result;
int Which_Calculation;
int Restart = 1;
int Forget_it = 2;
// Give instructions
cout << "Choose a task. Press 1 to add, 2 to subtract, 3 to multiply, and 4 to divide." << endl;
cin >> Which_Calculation;
// Get numbers
cout << "Please enter the first number." << endl;
cin >> Number_1;
cout << "Please enter the second number." << endl;
cin >> Number_2;
if (Which_Calculation == 1)
{
// Calculate the result
Result = Number_1 + Number_2;
}
if (Which_Calculation == 2)
{
// Calculate the result
Result = Number_1 - Number_2;
}
if (Which_Calculation == 3)
{
// Calculate the result
Result = Number_1 * Number_2;
}
if (Which_Calculation == 4)
{
// Calculate the result
Result = Number_1 / Number_2;
}
// Print the answer is...
cout << "The answer is..." << endl;
//Print the result
cout << Result << endl;
}
cout << "Would You Like to Do Another Task ? < 1 for yes and 2 for no >." << endl;
cin >> Guess;
// 1 or 2
if (Guess > Forget_it)
{
cout <<"Closing." << endl;
}
if (Guess > Restart)
{
cout <<"Restarting." << endl;
}
system ("PAUSE");
}
// Include the libraries
#include <iostream>
#include <ctime>
//Use the standard namespace
usingnamespace std;
void main ( )
{
//Declare the variables
int Pizza = 1;
int Dog = 2;
int Guess = 0;
while (Guess != Dog)
{
//This code repeats until the condition is no longer true
// Declare the variables
float Number_1;
float Number_2;
float Result;
int Which_Calculation;
// Give instructions
cout << "Choose a task. Press 1 to add, 2 to subtract, 3 to multiply, and 4 to divide." << endl;
cin >> Which_Calculation;
// Get numbers
cout << "Please enter the first number." << endl;
cin >> Number_1;
cout << "Please enter the second number." << endl;
cin >> Number_2;
if (Which_Calculation == 1)
{
// Calculate the result
Result = Number_1 + Number_2;
}
if (Which_Calculation == 2)
{
// Calculate the result
Result = Number_1 - Number_2;
}
if (Which_Calculation == 3)
{
// Calculate the result
Result = Number_1 * Number_2;
}
if (Which_Calculation == 4)
{
// Calculate the result
Result = Number_1 / Number_2;
}
// Print the answer is...
cout << "The answer is..." << endl;
//Print the result
cout << Result << endl;
// Get the user's guess
cout << "Would You Like to Do Another Task ? < 1 for yes and 2 for no >." << endl;
cin >> Guess;
//If the user guessed the right number, congratulate them
if (Guess == Pizza)
{
cout <<"Restarting" << endl;
}
//If the user guessed the right number, congratulate them
if (Guess == Dog)
{
cout <<"Shutting Down" << endl;
}
}
system ("PAUSE");
}