1到100,十位或则个位或则是7的倍数,打印数字和敲桌子
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 for (int i = 0; i < 100; i++) { 6 int bai = i / 100; 7 int shi = (i / 10) % 10; 8 int ge = i % 10; 9 if ((shi==7)||(ge==7)||(i%7==0) ){ 10 cout << i << endl; 11 cout << "敲桌子" << endl; 12 } 13 } 14 15 system("pause"); 16 return 0; 17 }
标签:10,int,ge,桌子,shi,100 From: https://www.cnblogs.com/Sandals-little/p/16872509.html