Mr. Umar throws two dice multiple times. Every time he throws the first dice it shows the value 3 and the value of the second dice varies. He will get some coupons if the sum of the two dice value is even. Assuming the first dice value is 3, the result can be computed as sum=3+x, x varies from 1 to 6. The possible sum values would be 4, 5, 6, 7, 8, 9. If the sum is 4 then he will get movie tickets, if the sum is 6 then he will get a lunch coupon, if the sum is 8 he will get amazon prime coupon. Any other value he will not be eligible for any coupon.
Requirements
Depending on the result display the appropriate coupon Mr. Umar gets
A student comes to take the admission for the hostel, Provided there are two hostels for girls and boys separately, Allotment has to be done for each student based on type of room i.e, number of sharing. For girls, only three sharing is available but for boys both two and three sharing is available. Given 8,000 for 3 sharing per month and 10,000 for 2 sharing per month.Following are the requirements: 1. Capture the Gender, Type of room, duration of stay(in months) 2. If gender is female/girls, Allotment can be done only with type of room as 3 sharing 3. If gender is male, allotment can be done with type of room as both 2 sharing and also 3 sharing. For two sharing, Amount is 10,000 per month per student and for 3 sharing, Amount is 8000 per month per person. 4. Compute the total Cost( Cost = Amount*duration) for both girls(3 sharing) and boys(2 and 3 sharing) 5. Display the Cost.
Design a C program the embed special character as leading and trailing to the input string and display the output.
Write C program to find sum of two numbers using #include Directives. Note: Use header file ADD.h in main program and call the function int sum(a,b).
An electricity board charges the following rates for the use of electricity: Number of Units Cost per Unit For the first 200 units Paise: 0.80per unit For the next 100 units Paise: 0.90per unit For t he next and above 300 units Rupee: 1.00per unit All users are charged a minimum of Rs. 100 as meter charge. If the total amount is more than Rs.400, then an additional surcharge of 15% of to tal amount is charged. Read the names of users and number of units consumed and print out t he charges with names.
In a library management system auditing is a complex task for a librarian. The stock maintenance has manual entries that may have multiple entries of book access number. The library management system should be automated to remove duplicate book access number. Write a C program to remove duplicate numbers using pointer Note: Use functions and Pointers.
An electricity board charges the following rates for the use of electricity: Number of Units Cost per Unit For the first 200 units Paise: 0.80per unit For the next 100 units Paise: 0.90per unit For the next and above 300 units Rupee: 1.00per unit All users are charged a minimum of Rs. 100 as meter charge. If the total amount is more than Rs.400, then an additional surcharge of 15% of total amount is charged. Read the names of users and number of units consumed and print out the charges with names.
Runtime Input :
100
500
Output :
Starting Reading: 100
Last Reading: 500
Unit Consumed: 400
Total Cost: 517.50