Wednesday 2 August 2017

basic small program of c

#include "stdio.h"
#include "conio.h"
char ch;
void main()
{
    printf("Enter a character\n");
    ch=getche();
    printf("\n");
    if((ch=='A') || (ch=='a'))
        printf("Abdullah");
    else if((ch=='B') || (ch=='b'))
        printf("Bilal");
    else if((ch=='C') || (ch=='c'))
        printf("Chishti");
    else if((ch=='F') || (ch=='f'))
        printf("Faraz");
    else
        printf("%c",ch);
 
}
  getchar();

0 comments: