if(yesorno != yes). Please post how I can do this, or a revised version of the code.
#include <stdafx.h>
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
//This states all of the variables that will be used in the code.
int division;
int addition;
int multiplication;
int subtraction;
int yesorno;
int operation;
int number1;
int number2;
//This states the forumula for each variable that will not be defined later
division = number1 / number2;
addition = number1 + number2;
multiplication = number1 * number2;
subtraction = number1 - number2;
//Asks the user what they want to do
cout << "Would you like to add, subtract, multiply, or add?";
cout << "\n";
cin >> operation;
//Double checks with the user with what they want to do
cout << "So you would like to ";
cout << operation;
cout << "?";
cout << "YES/NO";
cout << "\n";
cin >> yesorno;
//This decides the course of the user
if(yesorno != yes) //What Do I put here to make the program to go back to line 7?
if(yesorno = yes) cout << "What is the number you want to start out with?";
This post has been edited by CodingNewb: 09 December 2009 - 07:39 PM

New Topic/Question
Reply




MultiQuote






|