Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- void main() {
- int szam = 0;
- do {
- printf("Kerek egy 1-100 kozotti szamot: ");
- scanf("%d", &szam);
- } while (szam <= 0 || szam > 100);
- printf("A szam osztoi: ");
- for (int i = 1; i <= szam; i++) {
- if (szam % i == 0)
- printf("%d, ", i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment