Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int liczba, suma = 0;
- for(int i = 0; i < 10; ++i)
- {
- cin >> liczba;
- suma += liczba; // suma = suma + liczba
- }
- cout << "Suma podanych liczb wynosi " << suma << endl;
- cout << "Srednia podanych liczb wynosi " << 0.1 * suma << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement