Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int numero;
- cout << "Escribe un número: ";
- cin >> numero;
- for (int numero=1; numero < 10 && numero > 0; numero ++)
- {
- if (numero%!numero==0)
- cout << "No es un numero primo" << endl;
- else
- cout << "Es un número primo" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement