Thursday, 19 April 2018

Program To Print Weak Name According To The 1 to 7 Number in C

/*program to print weak name*/
# include <stdio.h>
void main ()
{
int a ;
clrscr () ;
printf ("/n enter a number :") ;
scanf ("%d", & a) ;
switch (a)
{
case 1 ;
printf ("/n today is sunday :") ;
break ;
case 2 ;
printf ("/n today is monday :") ;
break ;
case 3 ;
printf ( "/n today is tuesday :") ;
break ;
case 4 ;
printf ( "/n today is wednesday :") ;
break ;
case 5 ;
printf ("/n today is thrusday :") ;
break ;
case 6 ;
printf ( "/n today is friday :") ;
break ;
case 7 ;
printf ( "/n today is saturday :") ;
break ;
default :
printf ( "/n invalid number :") ;
}
getch () ;
}

No comments:

Post a Comment

Featured post

Program to find maximum of three number using user define function in C++

A function can be define by the user as per the requirement of the user or programmer . To implement a user define function , a programmer ...