I have a question related to Loops in python and C++(While)
What's the difference between executing loops as integers in both languages ?
Like python wouldn't accept zero as an integer(in a loop) and it wouldn't execute on the other hand C/C++ would make it true ?
And
Why does we see an error when we try to enter character in python but a skipped loop in c++ ?
c++ :
What's the difference between executing loops as integers in both languages ?
Like python wouldn't accept zero as an integer(in a loop) and it wouldn't execute on the other hand C/C++ would make it true ?
And
Why does we see an error when we try to enter character in python but a skipped loop in c++ ?
while int(input()): my code(moderator note: This also looks better in python tags)
c++ :
int x; while(cin>>x) { my code }