[Solved] CSC 2473 Programming Assignemnts Chapter 5

$25

File Name: CSC_2473_Programming_Assignemnts_Chapter_5.zip
File Size: 395.64 KB

SKU: [Solved] CSC 2473 Programming Assignemnts Chapter 5 Category: Tag:
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

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSC 2473 Programming Assignemnts Chapter 5
$25