Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Exercise #1: Phone Bill: customer a fixed subscription fee of 50 Dirhams in addition to the charges per liter. Each liter of water costs

image text in transcribed

C++

Exercise #1: Phone Bill: customer a fixed subscription fee of 50 Dirhams in addition to the charges per liter. Each liter of water costs 0.75 Dirham. To encourage customers to use less water, it imposes an extra charge on customers that exceed 1000 liters. The extra charge is 20% of the total bill. Write a program that computes the monthly pay of your water bill. The Water Company charges every Sample input/output: Enter the number of uater liters you consumed: see The total water bill 65e Dirhams Enter the number of uater liters you consumed: 1280 The total vater bill 114e Dirhams Exercise #2: Comparing digits of a number: Write a program that reads a two-digit number from a user. Then, the program prints the two digits in two separate lines. If the first digit is larger than the second digit, print their sum in the third line. Otherwise, print their product in the third line. Sample input/ output: Enter a tvo-digit number: 74 First digit 7 second digit :4 The sum of the digits = 11 Enter a tuo-digit number: 47 First digit: 4 econd digit 7 he product of the digits 28

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

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

Identify three types of physicians and their roles in health care.

Answered: 1 week ago

Question

Compare the types of managed care organizations (MCOs).

Answered: 1 week ago