#include <iostream>
using namespace std;
int main()
{
int i=1,j=7;
int count =0,count1=0;
while(i<10)
{
count++;
if(count<3)
{
cout<<"I="<<i<<" J="<<j<<endl;
}
else
{
cout<<"I="<<i<<" J="<<j<<endl;
count=0;
i+=2;
}
count1++;
if(count1<3)
{
j--;
}
else
{ count1=0;
j+=4;
}
}
return 0;
}
Add your comment