#include<iostream>
using namespace std;
void main()
{
//敲桌子
for(int i=1;i<=100;i++)
{
if(i%7==0||i%10==7||i/10==7)
{
cout<<"敲桌子"<<i<<endl;
}
else
{
cout<<i<<endl;
}
}
system("pause");
}
运行结果:
#include<iostream>
using namespace std;
void main()
{
//敲桌子
for(int i=1;i<=100;i++)
{
if(i%7==0||i%10==7||i/10==7)
{
cout<<"敲桌子"<<i<<endl;
}
else
{
cout<<i<<endl;
}
}
system("pause");
}