Question: Analyze the following problems and write a program for each of them. a ) Input an integer number. If it is greater than 0 ,
Analyze the following problems and write a program for each of them.
a Input an integer number. If it is greater than find its square. Otherwise find its cube.
b Given a value calculate according to the following formula:
c A student fails a course if he takes less than as overall grade. Given the overall grade of a student, display whether she passed or failed.
d A supermarket offers a discount if your bill is more than YTL Given the customer's id number and bill, display hisher id number with the amount heshe has to pay including the discount if any
e Calculate the water bill for a customer where the price of water is YTL for domestic users and YTL for industrial users. Input the userid consumption amount of water used user code D domestic, I industrial and output the userid and the amount to be paid.
f Given the loudness of a noice in decibels, display a perception message, using the following table:
tableLoudness in Decibels,Perception or lower,quietintrusiveannoyingvery annoyingabove uncomfortable
g Given a temperature in degrees Fahrenheit F convert it into degrees Centigrade C using the formula given in the first problem set, and output the temperature value in degrees Centigrade together with one of the messages:
tableVery Cold,if is in the range
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
