标签:期末考试 程序设计 namespace out using int nbsp stream 考试
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int a,b; 6 cin>>b>>a; 7 switch(b) 8 { 9 case 12:a+=2; 10 case 11:a+=3; 11 case 10:a+=2; 12 case 9:a+=3; 13 case 8:a+=3; 14 case 7:a+=2; 15 case 6:a+=3; 16 case 5:a+=2; 17 case 4:a+=3; 18 case 3:a+=1; 19 case 2:a+=3; 20 } 21 a%=7; 22 if(a==1||a==5) cout<<"YES"; 23 else cout<<"NO"; 24 }
标签:期末考试 程序设计 namespace out using int nbsp stream 考试
原文地址:https://www.cnblogs.com/miaohengming/p/12402138.html