+ 1
Why "No output" !?
Hi , can u plz help me out to find out why my code prints "No output" ? I guess the while loops do not terminate.. but the reason is not really obvious to me . Plz let me know that . https://pastebin.ubuntu.com/p/NBM6cPcy9D/
5 odpowiedzi
+ 2
Your condition of the while loop will never be false as you are neither changing the value of *t* not the value of a[t-1] inside the loop,which will make it an infinite loop.
The reason nothing is being printed on the console is because your program is hitting time limit before getting out of the loop.
+ 2
Arsenic thanks ! I expected that as number is being increased , a number will be replaced instead of at-1 , while it wont ! Cuz it is all adding new values to my vector ...
+ 1
A.S. hmm..no thats not the bug . bits/stdc++.h includes all libraries .
+ 1
No really syntax error , but i cout<<a[t-1] , and nothing is printed . There must be something wrong..
- 1
Actually your code not showing any syntex error or warnings what output u expecting