Blood bank

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] Enter your Age: 19 Enter your Weight: 50 Eligible to donate. Sample input and output 2: Enter your Age: 17 Enter your Weight: 50 Not Eligible to donate.

Program :

#include<stdio.h>
int main(){
  int age,w;
  scanf("%d",&age);
  scanf("%d",&w);
  if((age>18)&&(w>40))
    printf("Eligible to donate.");
  else
    printf("Not Eligible to donate.");
  return 0;
}