You are viewing a single comment's thread. Return to all comments →
someone name DOSH did it this way
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int s = 0; int t; while(cin>>t){ s+=t; } cout<<s; return 0; }
I thought this was interesting. Can anyone walk me through the thought proccess of how this works?
Seems like cookies are disabled on this browser, please enable them to open this website
Input and Output
You are viewing a single comment's thread. Return to all comments →
someone name DOSH did it this way
I thought this was interesting. Can anyone walk me through the thought proccess of how this works?