cpp实验一

#include<iostream>
using namespace std;
int main()
{
int a;
cin>>a;
switch(a)
{
case(1):
case(2):
case(3):
case(4):
case(5):
cout<<"workday.Let's work hard";
break;
case(6):
case(7):
cout<<"weekday.Let's have a rest";
default:
cout<<"invalid input" ;
}
return 0;
}

#include<iostream>

using namespace std;
int main()
{
int a,n=0;
cin >> a;
while (a>0)
{
n=n*10+a%10;
a=a/10;
}
cout<<n;
return 0;
} cpp实验一