0

1 1 12 21 123 321 1234 4321 12345 54321 1234 4321 123 321 12 21 1 1

25th Sep 2016, 4:16 PM
SAMBHAV KUMAR THAKUR
SAMBHAV KUMAR THAKUR - avatar
3 Respostas
+ 1
#include <iostream> using namespace std; int main() { int i,j; for (i=1;i<=5;i++) { for (j=1;j<=5;j++) { if (j<=i) cout <<j; else cout <<" "; } for (j=5;j<=9;j++) { if (i>=10-j) cout <<10-j; else cout <<" "; } cout <<endl ; } for (i=5;i>=1;i--) { for (j=1;j<=5;j++) { if (j<=i) cout <<j; else cout <<" "; } for (j=5;j<=9;j++) { if (i>=10-j) cout <<10-j; else cout <<" "; } cout <<endl ; } return 0; }
26th Sep 2016, 3:11 PM
Keval Nagda
Keval Nagda - avatar
+ 1
is this correct ?
26th Sep 2016, 3:11 PM
Keval Nagda
Keval Nagda - avatar
0
kya hai ye
25th Sep 2016, 5:11 PM
hack69