# CSC 2473 Programming Assignemnts Chapter 5 Solved

25.00 \$

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . ` zip` solution files instantly, after Payment

## Description

5/5 - (1 vote)
1. This assignment asks you to write 2 interactive programs that will give you experience in using theÂ `if`Â statement. The input for both programs will come from the keyboard.
2. The first program requires the use of nestedÂ `if`Â statements. Write a program that prompts the user as follows:

Enter a single letter, and I will tell you what the corresponding digit is on the telephone keypad.

Suppose the user enters the letterÂ `R`. Your program will output:

The digit 7 corresponds to the letter R on the telephone keypad.

If the user enters a character that is not a letter on the telephone keypad, for exampleÂ `&`, output the following:

There is no digit on the telephone keypad that corresponds to &.

Valid letters on a telephone keyboard include A through P and R through Y.Â Z, Q, and all other characters on the computer keyboard should be considered invalid.Â The user of the program should be able to enter bothÂ lowercaseÂ andÂ uppercase letters. The program output that you turn in should show how your program handles the following characters:Â `C`,`c`,`Q`,`N`,`n`,`&`. You will have to run your program 6 times.

1. The second program requires you to write a program as indicated in Programming Problem #10 on page 240 in your textbook. You are only asked to write a program to find the median of 3 numbers. Please use the following sets of data to test your program:

Data set 1:Â `123.67`Â `88.22`Â `555.11`

Data set 2:Â `345.45`Â `567.23`Â `777.44`

Data set 3:Â `879.13`Â `445.97`Â `675.32`

• Chapter-5.zip