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


  1. Write a program to input an year and check year is leap or not. 
  2. Write a program to input a number and check number is odd or even.
  3. Write a program to input two number and find smallest number
 4. Write a program to input two number and find highest number. 

 Share and Comment. 
Follow for recently updates.

Comments

Popular posts from this blog

Write a program to input age of any person and check he is eligible for voting or not.

Write a program to input two digit number and check number is palindrome or not.

Write a program to input speed of Royal Enfield and check it's running at economic speed or not.