Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- //за всяко число от 1 до 1000 -> принтиране
- //начало: 1
- //краят: 1000
- // + 1
- for (int number = 1; number <= 1000; number++) {
- //печатаме само ако завършва на 7
- if (number % 10 == 7) {
- cout << number << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment