Search & Find out

Thursday, November 26, 2009

IF ELSE

 Knowning the working of IF ELSE statements


#include "stdio.h"
#include "conio.h"
void main()
{ char a;
  clrscr();
  printf("enter a character");
  scanf("%c",&a);
  if(a=='F' || a=='f')
  { printf("F.Y.I.T");
  }
  else if(a=='S' || a=='s')
  { printf("S.Y.I.T");
  }
  else if(a=='T' || a=='t')
  { printf("T.Y.I.T");
  }
  else
  { printf("Invalid character");
  }
  getch();
  }



Download the executable (.exe)  file for this program..
download

0 comments:

Post a Comment

 

My Blog List

Term of Use