WELCOME TO MY BLOG BY SHABEEB.K

C,C++ PROGRAMMING: 09/08/13

Search This Blog

Sunday, 8 September 2013

FIND WHICH DAY IS.


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{

int option;
clrscr();

printf("ENTER ANY NUMBER IN 7 DAY IN WEEK\n");

scanf("%d",&option);


switch(option)
{
case 1 : printf("SUNDAY\n");

break;

case 2 : printf("MONDAY\n");

break;

case 3 : printf("TUESDAY\n");

break;

case 4: printf("WEDNESDAY\n");

break;

case 5 : printf("THURSDAY\n");

break;

case 6 : printf("FRYDAY\n");

break;

case 7 : printf("WEDNESSDAY\n");

break;

default : printf("INVALID INPUT\n");

break;

}
getch();
}





FIND A LETTER FROM ENGLISH ALPHABET


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str[50]="0ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int i;
clrscr();
printf("ENTER A NUMBER\n");
scanf("%d",&i);
printf("%dth character in list is %c",i,str[i]);
getch();
}