An electricity distribution company wants to calculate the electricity fee to be paid by the subscriber according to the type of electricily usage place (Residential: u or U, Workplace: p or P) as follows; n workplaces; 3.78TL for each kilowatt-hour (kwh), n residences Up to the first 60 kWh, each kWh is 2.98 TL, The

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
please solve in a quarter of an hour and they came
An electricity distribution company wants to calculate the electricity fee to be paid by the subscriber according to the type of electricity usage
place (Residential: u or U, Workplace: p or P) as follows;
In workplaces; 3.78TL for each kilowatt-hour (kwh),
In residences
Up to the first 60 kWh, each kWh is 2.98 TL,
Then, up to 120 kWh, each kWh is 3.62 TL,
For more (more than 100 kWh), it charges 2.56 TL for each kWh.
Using the C programming language, write an electricity bill calculation program in accordance with the rules below.
1-Use the switch.case structure while writing the program.
2-First, we ask the user for the 6-digit subscriber number. The user will enter a random 6-digit number after the program runs.
3- After entering the usage type, the first and last meter reading values will be entered randomly from the keyboard. Here, the first read value
cannot be greater than the last read value. Create a blocking line for this situation.
4- At the same time, a VAT(Value-added tax) amount of 32 TL is refleced on each invoice, regardless of the amount of usage.
5- Using the specified information, choose random numbers for all possibilties and add them to the bottom of the program. In other words, after
running the program, add the output to the bottom of the program.
For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).
Transcribed Image Text:please solve in a quarter of an hour and they came An electricity distribution company wants to calculate the electricity fee to be paid by the subscriber according to the type of electricity usage place (Residential: u or U, Workplace: p or P) as follows; In workplaces; 3.78TL for each kilowatt-hour (kwh), In residences Up to the first 60 kWh, each kWh is 2.98 TL, Then, up to 120 kWh, each kWh is 3.62 TL, For more (more than 100 kWh), it charges 2.56 TL for each kWh. Using the C programming language, write an electricity bill calculation program in accordance with the rules below. 1-Use the switch.case structure while writing the program. 2-First, we ask the user for the 6-digit subscriber number. The user will enter a random 6-digit number after the program runs. 3- After entering the usage type, the first and last meter reading values will be entered randomly from the keyboard. Here, the first read value cannot be greater than the last read value. Create a blocking line for this situation. 4- At the same time, a VAT(Value-added tax) amount of 32 TL is refleced on each invoice, regardless of the amount of usage. 5- Using the specified information, choose random numbers for all possibilties and add them to the bottom of the program. In other words, after running the program, add the output to the bottom of the program. For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).
Expert Solution
steps

Step by step

Solved in 5 steps with 3 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