#include main() { int doj,serv,cur; clrscr(); printf("Enter the year of joining: "); scanf("%d",&doj); printf("Enter the Current year: "); scanf("%d",&cur); serv=cur-doj; printf("The person has worked for %d years ",serv); getch(); }