Here is a program to determine the days of using C + +

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int day;
    
    cout<<“determine the day”<<endl;
    cout<<“1=monday  3=wednesday  5=friday  7=sunday”<<endl;
    cout<<“2=Tuesday   4=thursday  6=saturday”<<endl;
    cout<<endl;
    cout<<“enter the day (1-7) : “;
    cin>>day;
    
    if(hari==1)
    cout<<“monday”<<endl;
    else if(hari==2)
    cout<<“tuesday”<<endl;
    else if(hari==3)
    cout<<“wednesday”<<endl;
    else if(hari==4)
    cout<<“thursday”<<endl;
    else if(hari==5)
    cout<<“friday”<<endl;
    else if(hari==6)
    cout<<“saturday”<<endl;
    else if(hari==7)
    cout<<“sunday”<<endl;
    else
    cout<<“the code is not known”<<endl;
    cout<<endl;
    
    system(“PAUSE”);
    return EXIT_SUCCESS;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s