#40067: ans//不會再看


yp11251120@yphs.tp.edu.tw (708-43劉濟緯)

School : 臺北市私立延平高級中學
ID : 237257
IP address : [118.150.194.144]
Last Login :
2024-06-16 21:00:51
l960. 星期幾? -- 板橋高中教學題 | From: [203.72.178.1] | Post Date : 2024-04-26 11:45

#include<bits/stdc++.h>
using namespace std;
int main()
{
int k=0;
    string c[7]={"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday","Saturday"},a;
    cin>>a;
    for(int i=0 ;i<7; i++)
    {
    if(a==c[i]) 
{
cout<<i<<endl;
k=1;
break;
    }
}
if(k==0) cout<<"error"<<endl;
}
 
ZeroJudge Forum