Write a program to input age of an employee and check he is retired or working.
In this program we input age of an employee and check his status means he is Working or Retired.
For this program we input an employee age by user and check if age is greater than 60 then we print Retired else Print Working.
This is conditional statements program. For learn this program you should basic knowledge of conditional statements. Learn basic see if-else programs.
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter employee age=");
scanf("%d",&a);
if(a>=60)
printf("\nRetired");
else
printf("\nWorking");
getch();
}
OUTPUT
Enter employee age=65
Retired
OR
Enter employee age=55
Working
Related Examples
For this program we input an employee age by user and check if age is greater than 60 then we print Retired else Print Working.
This is conditional statements program. For learn this program you should basic knowledge of conditional statements. Learn basic see if-else programs.
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter employee age=");
scanf("%d",&a);
if(a>=60)
printf("\nRetired");
else
printf("\nWorking");
getch();
}
OUTPUT
Enter employee age=65
Retired
OR
Enter employee age=55
Working
Related Examples
- Write a program to input an year and check year is leap or not.
- Write a program to input a number and check number is odd or even.
- Write a program to input two number and find smallest number.
Share and Comment.
Follow for recently updates.
Comments
Post a Comment