Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int N = 5;
- int main()
- {
- setlocale(LC_ALL, "Rus");
- int a[N], i;
- int Sum = 0;
- cout << "Введите элементы массива ." << endl;
- for (i = 0; i < 5; i++)
- {
- cin >> a[i];
- Sum += a[i];
- }
- cout << "Сумма элементов массива равна = "<< Sum;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment