Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int num;
- do
- {
- cout << "Inserisci un numero positivo: ";
- cin >> num;
- }
- while (num <= 0);
- cout << "Numeri pari da 2 a " << num << ": ";
- for (int i = 2; i <= num; i += 2)
- cout << i << " ";
- cout << endl;
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment