السلام عليكم
لو سمحتوا ممكن تحلولي الأسئلة التالية:
Q1)Write a C++ program using do-while that takes in the number of units used ('units') as a screen input from the user.
It then calculates the total telephone bill for the customer on the following basis :
A compulsory fee of $25, plus
60 cents per unit for the first 50 units,
40 cents per unit for the next 150 units,
20 cents per unit for anything above 200 units.
It then outputs the bill using the 'cout' command.
Sample output
Enter the number of units used : 25
You have used 25 units.
Your total telephone bill is $40
Enter the number of units used : 60
You have used 60 units.
Your total telephone bill is $59
Enter the number of units used : 250
You have used 250 units.
Your total telephone bill is $125
Enter the number of units used :0
Exit loop
************************************************** **************
Q2)Write a C++ program takes in an integer num1 as a screen input from the user.
It then outputs the integer in its reversed form using the 'cout' command.
here a for SAMPLE INPUT
98764
here a SAMPLE OUTPUT
The integer you typed is 98764.
The reversed integer is 46789.
المفضلات