C programming : if else statement : hostel cost
The hostel in which you plan to spend the night tonight offers very interesting rates, as long as you do not arrive too late. Housekeeping finishes preparing rooms by noon, and the sooner guests arrive after noon, the less they have to pay. You are trying to build a C program that calculates your price to pay based on your arrival time.
Your program will read an integer (between 0 and 12) indicating the number of hours past noon of your arrival. For example, 0 indicates a noon arrival, 1 a 1pm arrival, 12 a midnight arrival, etc. The base price is 10 dollars, and 5 dollars are added for every hour after noon. Thankfully the total is capped at 53 dollars, so you'll never have to pay more than that. Your program should print the price (an integer) you have to pay, given the input arrival time.
Видео C programming : if else statement : hostel cost канала I am learning
Your program will read an integer (between 0 and 12) indicating the number of hours past noon of your arrival. For example, 0 indicates a noon arrival, 1 a 1pm arrival, 12 a midnight arrival, etc. The base price is 10 dollars, and 5 dollars are added for every hour after noon. Thankfully the total is capped at 53 dollars, so you'll never have to pay more than that. Your program should print the price (an integer) you have to pay, given the input arrival time.
Видео C programming : if else statement : hostel cost канала I am learning
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
C Programming: Add Two Complex Numbers by Passing Structure to a FunctionC programming :Factorial of number with recursionC program : how to display Fibonacci sequencec programming : how to count lines from input ??C programming :simple program with MallocC programming: if else statement to find cost of a carpool+100 C programming videos and thanks 44 subscribershow to calculate the circumference of a circle in c programhow to show ASCII code in c programC programming : Find the Number of Lines in a Text Filehow to change lowercase to uppercase in c program ;C program: To count alphabets,numbers and spaces .C Programming: Calculate Average Using Arrayshow to make a simple multiplication in c program.C programming : is a multiple of 3 or a multiple of 7 ??C programming : create a simple linked listC program :how many hour,minute,secondC programming: Find the maximum number between two numbers : pointerC programming : Demonstrate the use of & and * operatorscopy input to output 2d version (easy)