RI-ROTRACT 3201
Problem Description
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.
Input Format:
Input consists of two integers which corresponds to age and weight of a person respectively.
Output Format :
Display whether the person is eligible or not.
Sample input and output 1:
[All text in bold corresponds to input and the rest corresponds to output]
CODING ARENA
#include <stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if((a>=18)&&(b>=40))
printf("Eligible to donate");
else
printf("Not Eligible to donate");
return 0;
}
Test Case 1
Input (stdin)19
50
Expected Output
Eligible to donate
Test Case 2
Input (stdin)17
50
Expected Output
Not Eligible to donate
No comments:
Post a Comment