Playground
#include <iostream> using namespace std; int main() { int arr[10]; for (int i=0; i<10; i++) { cin >> arr[i]; //'i' se dvizi od 0 do 9! } int s = 0; for (int i=0; i<10; i++) s += arr[i]; //'i' se dvizi od 0 do 9! cout << "Zbirot e: " << s << endl; return 0; }
Input data
Program output
1 3 2 5 8 1 3 4 1 1
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!