#include <iostream>
#include <string>
using namespace std;
int main()
{
string one(100,'1');
one[0]='0';
cout << one << endl;
one[0]='1';
one[99]='0';
string zero(100,'0');
zero[0]='1';
cout<<zero<<endl;
for (int i=1; i<50;i++){
cout<<one<<endl;
cout<<zero<<endl;
}
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include <iostream> #include <string> using namespace std; int main() { string one(100,'1'); one[0]='0'; cout << one << endl; one[0]='1'; one[99]='0'; string zero(100,'0'); zero[0]='1'; cout<<zero<<endl; for (int i=1; i<50;i++){ cout<<one<<endl; cout<<zero<<endl; } return 0; } |
English