Write a program that prompts the user to enter the number of courses taken by a student. The program reads the code and the credit of each course, uses the switch statement to calculate, and print the tuition fees the student has to pay. Each course code includes 7 digits; the leftmost two digits indicates the course college. The tuition is calculated by multiplying college fees by the number of credits. The following table indicates the fee of every college: College code Fee per 1 credit 11 700 12 950 13 600 14 1200 15 800 The program should check if the code is a valid code. See given sample of input / output: Sample input / output: Enter the number of courses: 3 Enter the code and credit of course number 1: 1310362 3 Enter the code and credit of course number 2: 1850116 4 Enter the code and credit of course number 2: 1550116 4 Enter the code and credit of course number 3: 1e30423 2 Enter the code and credit of course number 3: 20e30423 2 Enter the code and credit of course number 3: 1130423 2 The student tuition fees for 3 courses is: 6400

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Program IV: The Tuition Part
Write a program that prompts the user to enter the number of
courses taken by a student. The program reads the code and the
credit of each course, uses the switch statement to calculate, and
print the tuition fees the student has to pay. Each course code
includes 7 digits; the leftmost two digits indicates the course
college. The tuition is calculated by multiplying college fees by the
number of credits. The following table indicates the fee of every
college:
College code Fee per 1 credit
11
700
12
950
13
600
14
1200
15
800
The program should check if the code is a valid code. See given
sample of input / output:
Sample input / output:
Enter the number of courses: 3
Enter the code and credit of course number 1: 1310362 3
Enter the code and credit of course number 2: 1850116 4
Enter the code and credit of course number 2: 1550116 4
Enter the code and credit of course number 3: 1030423 2
Enter the code and credit of course number 3: 2030423 2
Enter the code and credit of course number 3: 1130423 2
The student tuition fees for 3 courses is: 6400
Transcribed Image Text:Program IV: The Tuition Part Write a program that prompts the user to enter the number of courses taken by a student. The program reads the code and the credit of each course, uses the switch statement to calculate, and print the tuition fees the student has to pay. Each course code includes 7 digits; the leftmost two digits indicates the course college. The tuition is calculated by multiplying college fees by the number of credits. The following table indicates the fee of every college: College code Fee per 1 credit 11 700 12 950 13 600 14 1200 15 800 The program should check if the code is a valid code. See given sample of input / output: Sample input / output: Enter the number of courses: 3 Enter the code and credit of course number 1: 1310362 3 Enter the code and credit of course number 2: 1850116 4 Enter the code and credit of course number 2: 1550116 4 Enter the code and credit of course number 3: 1030423 2 Enter the code and credit of course number 3: 2030423 2 Enter the code and credit of course number 3: 1130423 2 The student tuition fees for 3 courses is: 6400
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY