DIGIT-ARC read-only archive · snapshot: July 23, 2026

Problem with the C program

4 posts · originally from https://geek.digit.in/community/threads/problem-with-the-c-program.190846/

W
way2jatin Original post #1
Apr 3, 2015 at 9:59 PM
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.

First input corresponds to the Time limit for the task in hours. Second,Third and Fourth Inputs correspond to the number of hours Taken by the first , second and third persons respectively to complete the task.

Display the person who Completes first.

Code should be written in C language. Only use Conditional Statements plz.

P.S: I know the program is quite easy and believe me, I have already done it but I need a more efficient code for this problem.
nisargshah95
Apr 8, 2015 at 6:32 PM
Share your code and we'll see what needs to be done.
RCuber
RCuber #3
Apr 8, 2015 at 6:36 PM
Yea, Please post your code, we can optimize it
anky
anky #4
Mar 15, 2016 at 11:53 AM
s share ur code so we can work n optimization.
And wen u say only conditional statements means no use of functions?