Kacper_Michalak

Zadanie pętle 6

Dec 8th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int i;
  7.     int x,y=0;
  8.  
  9.     for (i = 0; i < 10; i++)
  10.     {
  11.         cout << "Podaj liczbe" << endl;
  12.         cin >> x;
  13.         y += x;
  14.     }
  15.     cout << "Suma 10 liczb rowna sie: " << y << endl;
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment