+ 4
How i solve this code??
1 2 3 4 4 5 6 7 7 7 8 9 10 10 11 12 13 13 13 14 15 16 16 17 18 19 19
3 Answers
+ 7
#include <iostream>
using namespace std;
int main() {
int x = 1;
for(int i=1;i<=6;i++)
{
if(i%2==0)
for(int j=1;j<=5;j++)
{
cout<<x<<" ";
if(j<4)
x++;}
else
for(int j=1;j<=4;j++)
{
cout<<x<<" ";
if(j<4)
x++;}
cout<<"\n";
}
return 0;
}
+ 3
please help me
+ 1
thanks