What I have so far is:
int main()
{
int num1, num2;
//get two numbers
cout << "Please enter two positive integers seperated by a comma: ";
cin >> num1 >> num2;
while ((num1 < 0) || (num2 < 0))
{
cout << "Please enter two positive integers: ";
cin >> num1 >> num2;
}
I believe this is how you get the user to enter two positive numbers but I don't know how to get Ruby to return the highest value 10 .... 20 or return 0 if not in range.
I would very thankful for any help.
Thank you.
This post has been edited by Karel-Lodewijk: 16 February 2012 - 07:53 AM
Reason for edit:: Added code tags

New Topic/Question
Reply



MultiQuote







|