### Free Educational Resources

• > PRG 410 WEEK 5 ASSIGNMENT
+

# PRG 410 WEEK 5 ASSIGNMENT

(0)
Author: un quite
##### Description:

http://unquite.com/question-details/PRG-410-WEEK-5-ASSIGNMENT/767

or email us at:

query@unquite.com

PRG 410 WEEK 5 ASSIGNMENT

UOP

C++ Programming I

PRG-410

ASSIGNMENT # 4

Problem 1: Write a program that asks the user to enter a number within the range of 1 through 10. Use a switch statement to display the Roman numeral version of that number.

Input Validation: Do not accept a number l

Problem 2: A bank charges \$10 per month plus the following check fees for a commercial checking account:

\$.10 each for fewer than

20 checks \$.08 each for

20-39 checks

\$.06 each for 40-59

checks \$.04 each for 60

or more checks

The bank also charges an extra \$15 if the balance of the account falls below \$400 (before any check fees are applied). Write a program that asks for the beginning balance and the number of checks written. Compute and display the bank’s service fees for the month.

Input Validation: Do not accept a negative value for the number of checks written. If a negative value is given for the beginning balance, display an urgent message indicating the account is overdrawn.

Problem 3: Write a program that asks the user for a positive integer value. The program should use a for loop to get the sum of all the integers from 1 up to the number entered. For example, if the user enters 50, the loop will compute the sum of 1, 2, 3, 4, … 50.

Input Validation: Do not accept a negative starting number. Write the algorithm of a program that reads two integers and outputs them in increasing order.

Problem 4: Write a program that uses a for loop to display the characters for the ASCII codes 0 through 127. Display 16 characters on each line.

Problem 5: Write a program using a do- while loop that lets the user enter a series of positive integers. The user  should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display

the largest and smallest numbers entered.

Problem 6: Write a program that generates a random number and asks the user to guess what the number is. If the user’s guess is higher than the random number, the program should display Too[ high

(more)
##### Try a College Course Free

Sophia’s self-paced online courses are a great way to save time and money as you earn credits eligible for transfer to over 2,000 colleges and universities.*

No credit card required

25 Sophia partners guarantee credit transfer.

221 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 20 of Sophia’s online courses. More than 2,000 colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.

Tutorial