Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Learning Objectives: More practice with user input/output, including string input. Use of if/else, possibly nested, to solve simple problems. - General Description 1. Write a

image text in transcribed
Learning Objectives: More practice with user input/output, including string input. Use of if/else, possibly nested, to solve simple problems. - General Description 1. Write a program that asks the user to enter 3 numbers, one at a time. Print the three numbers in sorted order. [Note: no need to use an array or similar structure!] Examples (user input in blue) Enter number1 45 Enter number 1: 55 Enter number 2: 45 Enter number 3: 35 Sorted they are 35 45 55 Enter number 2: 35 Enter number 3: 55 Sorted they are 35 45 55 2. In the same program Write code that will display the following menu: A. Aleppo Pepper B. Banana Pepper C. Cayenne Pepper D. Dragons Breath Enter a letter to choose a pepper: Calculate the Scoville Units (measure of hotness) Aleppo 30,000 Banana-1,000 Cayenne 40,000 Dragon's Breath 2,480,000 Print the Scoville Units for the chosen pepper, example That's 1000 Scovilles of heat! The program should handle both upper and lower case entries... that is 'A or 'a' should print the Scoville Units for the Aleppo. The program should print "That pepper is not on the list" when the user enters anything besides A, B, C, D (or a,b,c,d). You may assume the user will not enter blanks in their answer, but they may enter more than one character As always, the program should end with a pause

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

S A A a B | A d | B b C g How to eliminate left recursion?

Answered: 1 week ago

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago