Question: Hi guys Im working on coding with C++ I cant figure both of this problem it seems to make errors during the process. Im suppose

Hi guys Im working on coding with C++ I cant figure both of this problem it seems to make errors during the process. Im suppose to use while / for and do while loops If you could help me out Ill save me a lot. Thank you so much!

Problem 1: Print Numbers (10 points)

Write a program that lets the user input two numbers and the program prints out every number in between both input numbers including the numbers themselves. The program should work as follows:

  1. The program will then greet the user.
  2. Next, the program prompts the user to enter two numbers between -100 and 100.
  3. For each number: If the number is below or above the valid range, re-prompt repeatedly until a valid value has been entered.
  4. The two numbers can be the same or different value.
  5. If the first number is smaller than the second number, it will output a sequence of ascending numbers.
  6. If the first number is larger than the second number, it will output a sequence of descending numbers.
  7. If both numbers are equal, only that number will be shown.

Problem 2: Menu (10 points)

A restaurant offers the following menu for take out. Customers can order any of the three items on the menu. Each item may be ordered 1-10 times. After an order is placed, the bill is printed with every single item ordered on the bill and the total price of the entire order at the bottom. That is, an order of one cheese salad and three pepperoni burgers would result in a bill showing Cheese Salad once and listing Pepperoni Burger three times.

The Menu:

  1. Cheese Salad
  2. Pepperoni Burger
  3. Caesar Pizza

Implement a program for the above description. Validate all input repeatedly until a valid input is entered. Print out the bill to the console.

here is what Ive done so far

Problem1

Hi guys Im working on coding with C++ I cant figure both

Problem2

of this problem it seems to make errors during the process. Im

2 #include 3 using namespace std; 4 5 int main() 6 { 7 cout > valuel; 16 17 cout > value2; 19 20 while (num >= -100 || 100 Se num) 21 { 22 cout > valuel; 26 cout > value2; break; } 29 30 31 32 while (num ==value1 Il num = value2) { for (int num = valuei; num >= value2; num--) cout #include 10 using namespace std; 44 11 12 int main(). 13 ( 14 cout > choice; " 30 31 32 33 34 35 while ((choice 3) && choice = -1) { cout > choice; } float price = 0.8; switch (choice) { case 1: price = 3.33f; break; 61 43 case 2: price = 3.33f; break; 46 26 case 3: price = 3.335; 48 50 break; 51 52 } 53 total + price; 54 ) 55 56 while (choice = -1); 57 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!