Код: Выделить всё
#include
using namespace std;
int main(){
int i,sum=0;
while((cin>>i).good())
sum+=i;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/20815349/how-to-resume-input-stream-after-stopped-by-eof-in-c[/url]Код: Выделить всё
#include
using namespace std;
int main(){
int i,sum=0;
while((cin>>i).good())
sum+=i;
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/20815349/how-to-resume-input-stream-after-stopped-by-eof-in-c[/url]