All pastes #589712 Raw Edit

Unnamed

public cpp v1 · immutable
#589712 ·published 2007-06-26 04:26 UTC
rendered paste body
/* All I want is for it to start over again if they press 1 and to exit if they press 2 */#include <iostream>int main(){                   int firstNumber, secondNumber, yesOrno;                   while(yesOrno == 1)                   std::cout << "\nEnter two numbers.\nFirst: ";                   std::cin >> firstNumber;                   std::cout << "Second: ";                   std::cin >> secondNumber;                   std::cout << "\n\n";                                      if (firstNumber >= secondNumber)                   {                                   if ( (firstNumber % secondNumber) == 0)                                   {                                        if (firstNumber == secondNumber)                                           std::cout << "They are the same!\n";                                           else                                           std::cout << "They are evenly divisible!\n";                                   }                                    else                                        std::cout << "They are not evenly divisible!\n";                   }                   else                       std::cout << "Hey! The second one is larger!\n";                   {                       std::cout << "Would you like to play again?\n";                       std::cout << "Yes = 1 or No = 2\n";                       std::cin >> yesOrno;                       if (yesOrno == 1)                       {                                   std::cout << "Ok! You can play again";                       }                       else                       {                           std::cout << "OK!";                       }                   }                       return 0;}