Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int sum = 0;
- for (int i = 1; i <=100; i++) {
- if (i % 7 == 2) {
- sum += i;
- cout << i << "\t"
- }
- }
- cout <<"\nSumm=" << sum << "\n"
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment