+ 1
To print the pattern
12345 23451 34512 45123 51234
2 Answers
+ 3
#include<iostream>
using namespace std;
int main()
{
int I, j, k;
for(i=1;i<=5;i++)
{
for(j=i;j<=5;j++)
{
cout<<j;
}
for(k=1;k<i;k++)
{
cout<<k;
}
cout<<endl;
}