C++ Program to input number of week's day(1-7) and translate to its equivalent name of the day of the week using switch

C++ Program to input number of week's day(1-7) and translate to its equivalent name of the day of the week using switch(example:- 1 to sunday, 2 to monday in CodeBlocks.


IMAGE SAMPLE


C++ Program to input number of week's day(1-7) and translate to its equivalent name of the day of the week using switch(example:- 1 to sunday, 2 to monday in CodeBlocks.
techeeINDIA


||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||


#include<iostream>
using namespace std;
int main()
{
    int days ;
    cout<<"\nEnter number of week's day(1-7) : ";
    cin>>days;
    switch(days)
    {
        case 1 : cout<<"\n Sunday";
                 break;
        case 2 : cout<<"\n Monday";
                 break;
        case 3 : cout<<"\n Tuesday";
                 break;
        case 4 : cout<<"\n Wednesday";
                 break;
        case 5 : cout<<"\n Thursday";
                 break;
        case 6 : cout<<"\n Friday";
                 break;
        case 7 : cout<<"\n Saturday";
                 break;
       default : cout<<"\n wrong number of days ";
       break;
    }
    return 0;
}



||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

OUTPUT:-

we take number of week's day = 5

so, output will be thursday

output of C++ Program to input number of week's day(1-7) and translate to its equivalent name of the day of the week using switch
techeeINDIA




                                                                                      - JAI HIND               

                                                                                                                                                                  ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

C++ Program to input number of week's day(1-7) and translate to its equivalent name of the day of the week

C++ Program to input number of week's day(1-7) and translate to its equivalent name of the day of the week using switch C++ Program to input number of week's day(1-7) and translate to its equivalent name of the day of the week using switch Reviewed by mushrafkhan772 on June 19, 2018 Rating: 5

10 comments:

  1. wow mushruf
    for my you tube channel click for more
    https://youtu.be/zV3zMU_zZeQ

    ReplyDelete
  2. I don't know much about softwares but it is a intresting thing too do , great job software engineer @mushraf ..
    Work and and became a CEO of my company 😉

    ReplyDelete
  3. Sahi Khel Gaya Bhai . Ye sab KuchKuch Sa to nahi aya par dikhne me achcha laga.Carry on bro.
    #The G.O.A.T. Mushraf!!

    ReplyDelete

Powered by Blogger.