#include<iostream> using namespace std; int main() { int i = 0; int s = 0; while(i<10) { cout<<i<<endl; s=s+i; i++; } cout<<s<<endl; return 0; }