Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please I need someone to solve C programming ASAP Write a C program that prompts for and reads the number of courses a student takes

Please I need someone to solve C programming ASAP
image text in transcribed
Write a C program that prompts for and reads the number of courses a student takes in a semester; it then displays the total charge to be paid. In each semester, a private University charges 2000 Dollars per course for each of the first four courses a student takes. For each course in excess of 4 , the charge is 1500 per course. Your program must display an appropriate error message if the entered number of courses is zero or negative. [ /10] codio@tonight-bogart: /workspace/exam\$ ./q6 Enter number of courses: 3 Total charge =6000 Dollars codio@tonight-bogart: /workspace/exam\$./q6 Enter number of courses: 5 Total charge =9500 Dollars codio@tonight-bogart: /workspace/exam\$./q6 Enter number of courses: -2 Error: Invalid number of courses

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

Mastering Real Time Analytics In Big Data A Comprehensive Guide For Everyone

Authors: Lennox Mark

1st Edition

B0CPTC9LY9, 979-8869045706

More Books

Students also viewed these Databases questions

Question

Explain the causes of indiscipline.

Answered: 1 week ago