Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "Podaj pierwsza liczbe: ";
- int x, y;
- int suma = 0;
- cin >> x;
- cout << "Podaj druga liczbe: ";
- cin >> y;
- for(int i=x; i<=y; i++)
- {
- if (i%3==0)
- {
- suma = suma + i;
- }
- }
- cout <<"Suma: " << suma;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement