How do I output this in C using functions I will rate right

How do I output this in C++ using functions? I will rate right away if it works! Thanks!

Solution

Solution.cpp


#include <iostream>//header file for input output function
using namespace std;//it tells the compiler to link std namespace
int Display();//function declaration
int main()
{//main function
   Display();//function calling
return 0;
}
int Display()
{//function definition
     string name;
    int noofday;
    cout << \"Enter your name here: \";
    getline (cin, name);//key board inputting a line
    cout<<\"Welcome    \"<<name<<\"!\"<<endl;
    cout<< \"1 - Monday\"<<endl;
    cout<< \"2 - Tuesday\"<<endl;
     cout<<\"3 - Wednesday\"<<endl;
     cout<<\"4 - Thursday\"<<endl;
     cout<<\"5 - Friday\"<<endl;
     cout<<\"6 - Saturday\"<<endl;
     cout<<\"7 - Sunday\"<<endl;
    cout<<\"Please enter no of day(1-7)\";
    cin>>noofday;//key board inputting
    cout<<\"so Today is \";
    if(noofday==1)//if elseif statement
    cout<<\" Monday\";
    else if(noofday==2)
    cout<<\" Tuesday\";
    else if(noofday==3)
    cout<<\" Wednesday\";
    else if(noofday==4)
    cout<<\" Thursday\";
    else if(noofday==5)
    cout<<\" Friday\";
    else if(noofday==6)
    cout<<\" Saturday\";
    else if(noofday==7)
    cout<<\" Sunday\";

  
    return 0;
}

output

Enter your name here: Joe Deo
Welcome    Joe Deo!
1 - Monday
2 - Tuesday
3 - Wednesday
4 - Thursday
5 - Friday
6 - Saturday
7 - Sunday
Please enter no of day(1-7)5
so Today is Friday

How do I output this in C++ using functions? I will rate right away if it works! Thanks!SolutionSolution.cpp #include <iostream>//header file for input ou
How do I output this in C++ using functions? I will rate right away if it works! Thanks!SolutionSolution.cpp #include <iostream>//header file for input ou

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site