+ 1

How could I could a number pattern

//4321 //432 //43 //4 Like this one Int main() { Int i,j; For (int i = 1; i<= 4; i++) { For (int j = 1; j<= 4; j--) Using cpp

14th Dec 2020, 3:58 AM
Benito Estimo
Benito Estimo - avatar
3 RĂ©ponses
+ 3
Benito Estimo Using CPP-- for(int i = 0; i < 4; i++) { for (int j = 4; j > i; j--) { cout << j; } cout << endl; } https://code.sololearn.com/ctBzd7fm30jO/?ref=app
14th Dec 2020, 4:17 AM
AÍąJ
AÍąJ - avatar
+ 2
#include<stdio.h> int main() { int i,j,k; for(i=1;i<=5;i++) { for(j=5;j>=1;j--) { if(j<=i) printf("%d",j); else printf(" "); } printf("\n"); } return 0; }
14th Dec 2020, 4:15 AM
TECH WORLD
TECH WORLD - avatar
+ 1
Try this↓ #include<iostream> using namespace std; int main() { int i=0,j=4; Outside: if(i++<=4) { j=5; Inside: if(j-->i) {cout<<j; goto Inside;} cout<<endl; goto Outside;} return 0; }
14th Dec 2020, 6:01 AM
˜”*°‱.˜”*°‱ Mohan 333 ‱°*”˜.‱°*”˜
˜”*°‱.˜”*°‱ Mohan 333 ‱°*”˜.‱°*”˜ - avatar