+ 1

To print the pattern

12345 23451 34512 45123 51234

8th Apr 2017, 3:03 PM
Vivek
Vivek - avatar
1 Antwort
+ 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; }
10th Apr 2017, 12:40 PM
Harshitha P N