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