0
How can I get a result like this
1 1 2 1 1 3 3 1 1 4 4 4 1
1 Resposta
+ 2
#include <iostream>
using namespace std;
int main() {
for(int I=1;I<=4;I++)
{
for(int j=1;j<((I==1)?I:I+1);j++)
{
if(j==1) cout<<j;
else cout<<I;
}
cout<<"1"<<endl;
}
return 0;
}