Chapter 2 Program 9
Also visit our YouTube Channel Tech Eos VISIT CHANNEL
/* 9. Write a program to check whether the blood donor is eligible
or not for donating blood. The conditions laid down are as under.
Use if statement. a) Age should be above 18 yrs but not more than 55 yrs.
*/
#include<stdio.h>
#include<conio.h>
void main()
{
int age ;
clrscr();
printf("Enter your age : ");
scanf("%d" , &age );
if( age >=18 && age<=55 )
{
printf("\n\nYour are eligible for donating blood");
}
else
{
printf("\n\nYour are not eligible for donating blood");
}
getch();
}
Comments
Post a Comment