E-BOX
BASICS OF C PROGRAMMING
Conditional Statements :- Code Analysis
PROBLEM - 3
Pie Eating Contest
At the State Fair Pie Eating Contest all contestants in the heavyweight division must weigh within 30 pounds of 250 pounds. Write a program that asks for a contestant's weight and then says if the contestant is allowed in the contest.
Input Format:
Input consists of an integer which corresponds to the contestant's weight in pounds.
Output Format:
Output consists of a string “IN” or “OUT”.
Refer sample input and output for further formatting specifications.
Sample Input and Output:
[All text in bold corresponds to input and the rest corresponds to output]
Enter contestants weight
240
IN
SOLUTION :
No comments:
Post a Comment