Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void) {
- int n;
- while (1) {
- printf("n="); scanf("%d", &n);
- if (!n) {
- break;
- } else if (n > 0) {
- if (n % 2) {
- puts("impar");
- } else {
- puts("par");
- }
- } else {
- puts("eroare: n tre sa fie >0");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement