Friday 21 April 2017

Conditional Statements /Session III (part 2)

11.   Mickey mouse 


Mickey and Miney are two friends. Goofy was one of the Mickey's enemy.He was jealous of Mickey because Mickey was liked by everyone. One day Mickey and Miney went on to a trip. Goofy planned to kidnap Miney. He kidnapped Miney and kept her in one of the  hot balloons tied up to a height. There were 50 hot balloons numbered from one. Each balloon will fly to a certain height. Only the numbers  having  3 and 7 as its factors can fly upto the height of the Miney's balloon. Mickey was confused and he didn't know which numbered balloon can fly to Miney.

So write a  program to help the Mickey in finding the balloon.

code:



12.   DOLL SHOW
In london, every year during dasara there will be a very grand doll show. People try to invent new new dolls of different varieties. The best sold doll's creator will be awarded with cash prize. So people broke their head to create dolls innovatively. Knowing this competition, Mr.Lokpaul tried to create a doll which sings  only when a even number is pressed and the number should be greater than zero and less than 100.
So write a  program to help Mr.Lokpaul to win.

code:




13.     A Task

 A task is given to 3 persons to complete it within a particular time. If the person exceeds the time limit he will be disqualified. Only those who complete it within the given time limit is qualified. Among the qualified persons, the person who completes the task first will be rewarded.
Write a program to find the person who is rewarded.

code :




14.    Blood bank
A team from Rotract club had planned to conduct a rally to create awarness among the coimbatore people to donate blood. They conducted the rally successfully . Many of the coimbatore people realized it and came forward to donate their blood to near by blood bank.  The eligibility criteria for donating blood is people should be above 18 and his/ her weight should be above 40. There was a huge crowd and staff in blood bank found it difficult to manage the crowd. So they decided to keep a system and ask the people to enter their age and weight in system. If a person is eligible he / she will be allowed inside.
Write a  program and  feed it to  the system  to find whether a person is eligible or not.

code :




15.    BETTER or NOT

One criteria for evaluating 2 different colleges is based on the student strength.

Write a  program to compare 2 colleges based on the student strength.

code:




16.  Y2K Problem Detector

Write a program that asks a user for their birth year encoded as two digits (like "62") and for the current year, also encoded as two digits (like "99"). The program is to correctly write out the users age in years.
code:


17.    MONTHS

 Write a  program that accepts an integer as input and displays the corresponding month in words. [ January, February, March, April, May, June, July, August, September, October, November, December]. Use Switch statement

code:


















18.   BASIC CALCULATOR

Write a  program to simulate a basic calculator. [+,-,*,/,%]. Use switch statement.






19.    FEES CALCULATOR

Write a program that displays the fees that a student needs to pay at the end of the semester. Use switch statement.

Input Format:

            The first line of the input consists of a character from the set {A, B, C, D}. A corresponds to a day scholar student with the required attendance percentage. B  corresponds to a day scholar student without the required attendance percentage. C corresponds to a  hostel student with the required attendance percentage. D corresponds to a hostel student without the required attendance percentage.
            The second line of the input consists of an integer which corresponds to the number of regular  papers for which the student is appearing in the examination.
            The third line of the input consists of an integer which corresponds to the  fee to be paid per regular  paper.
            The fourth line of the input consists of an integer which corresponds to the number of backup(arrear) papers for which the student is appearing in the examination.
            The fifth line of the input consists of an integer which corresponds to the  fee to be paid per arrear paper.


code:



20.   HOTEL TARIFF CALCULATOR

Write a  program to calculate the hotel tariff. The room rent is 20% high during peak seasons [April-June, November-December] . Use Switch statement.





thankyou.....

No comments:

Post a Comment