+ 1
No Output.
I want to print the following pattern. 33333 32223 32123 32223 33333. But having no output. What's wrong? https://code.sololearn.com/cp8hfUhRMJBR/?ref=app https://code.sololearn.com/cp8hfUhRMJBR/?ref=app
7 Respostas
+ 1
Salam, hi
Timeout: the monitored command dumped core.
for(k=0;k<=2*(c++);k++) in line 43, you can't use increment in loop condition that will cause infinity loop k will never rich the value of 2*(c++), replace (c++) with (c+1).
+ 3
Also for(j=n-1;j>=0;j++) in line 35 results in an infinite loop. If you count up j it will obviously be larger than 0.
+ 2
Don't --i in for loop of i (line 28, line 44)
+ 2
Think you used one to many }
Remove the one in line 50 and put it after line 60. Then you get the print but still wrong.
+ 2
Look to the changes I've made, you might like it
https://code.sololearn.com/cw3dr1bxeQuC/?ref=app
+ 1
Rafik Abdelhak Nadir ,Aaron Eberhardt ,Gordon ,Paul Jacobs.
JazakALLAHukhairrr,
Thank You so much for taking the time and helping Me...
Now it's sorted...
0
Sayed Waseem.
W jazaka allaho bimethlih.
U r welcome.