Polnochniy

Untitled

Nov 8th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. const int N = 5;
  4. int main()
  5. {
  6. setlocale(LC_ALL, "Rus");
  7. int a[N], i;
  8. int Sum = 0;
  9. cout << "Введите элементы массива ." << endl;
  10. for (i = 0; i < 5; i++)
  11. {
  12. cin >> a[i];
  13. Sum += a[i];
  14. }
  15. cout << "Сумма элементов массива равна = "<< Sum;
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment