google.com, pub-8786015629279405, DIRECT, f08c47fec0942fa0 Write a Program using Switch Statement in C

Write a Program using Switch Statement in C

1
Write a Program using Switch Statement in C



//Write a Program using Switch Statement in C

#include<stdio.h>
#include<conio.h>
void main()
{
int ch;
clrscr();
printf("Enter Your Choice");
scanf("%d",&ch);
switch(ch)
{
case 1: printf("Today is Sunday");
break;
case 2: printf("Today is Monday");
break;
case 3: printf("Today is Tuesday");
break;
case 4: printf("Today is Wednesday");
break;
case 5: printf("Today is Thrusday");
break;
case 6: printf("Today is Friday");
break;
case 7: printf("Today is Saturday");
break;
default:printf("Please Enter Your Choice between 1 to 7");
}
getch();
}


Output:


Post a Comment

1 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Thank you for your interest 😊

We will back shortly after reviewing...

  1. #include
    #include
    void main()
    {
    int m,e,c,p,h,sum,per;
    printf ("Enter the value of five subject ,m,e,c,p,h.");
    scanf("%d%d%d%d%d,&m,&e,&c,&p,&h ");
    sum=m+e+c+p+h;
    per=sum/5;
    if (per<=60)
    {
    printf (" you got first division.");
    }
    else
    if(per<=50)
    {
    printf ("you got second division.");
    }
    else
    if (per<=40)
    {
    printf (" you got third division.");
    }
    else
    {
    printf (" fail");
    }
    getch();
    }


    Sir ho gya marks vala program

    ReplyDelete

Thank you for your interest 😊

We will back shortly after reviewing...

Post a Comment

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top