Question: 1-nput an integer N of three digits. Create a new integer R which is the reverse of N. Output R. Hint: First separate the three
1-nput an integer N of three digits. Create a new integer R which is the reverse of N. Output R. Hint: First separate the three digits of N and then find the formula to calculate R.
2-The formula for calculating the area of a triangle is: = ( )( )( ), where = (0.5)( + + ), and a, b, and c are the lengths of the three sides. Input three inetegers a, b, and c, and calculate the area of the triangle
3You can get one toy for 10 coupons. For example, if you have 57 coupons, then you can get 5 toys, and 7 coupons remaining. You can also get 1 chocolate for 3 coupons. For example, if you have 7 coupons then you can get 2 chocolates and 1 coupon remaining. Input the number of coupons and calculate how many toys, and chocolates you can get with the remaining coupons, or only the chocolates with the remaining coupons.
4-Input three integers x, y, and z. Find the minimum, mid, and maximum of the three numbers.
5-The cost of a phone call is calculated is follows: 1) The connection cost is 1.5 dirhams. 2) First 5 minutes will cost 3 dirhams. 3) Next 5 minutes will cost 1.2 dirhams per minute. 4) Any additional minute will cost 0.8 dirhams per minute. Input the total number of minutes for the phone call, and calculate the cost of the phone call.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
