Skip to content

Commit

Permalink
Merge pull request #395 from alissonfariias/master
Browse files Browse the repository at this point in the history
Add questoes 1074 e 1075
  • Loading branch information
lucasmedeiros authored Nov 2, 2019
2 parents e37f50e + d894012 commit 79662fb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
31 changes: 31 additions & 0 deletions prog1/implementacoes/uri/1074.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include <stdio.h>
#include <stdlib.h>

int main (){
int n, i, numero;
i=0;

scanf ("%d", &n);

for (n=n; n>i; i++){
scanf("%d", &numero);

if (numero % 2 == 0 && numero > 0){
printf("EVEN POSITIVE\n");

}else if (numero % 2 == 0 && numero < 0){
printf("EVEN NEGATIVE\n");

}else if (numero % 2 != 0 && numero > 0){
printf("ODD POSITIVE\n");

}else if (numero % 2 != 0 && numero < 0){
printf("ODD NEGATIVE\n");

}else if (numero == 0){
printf("NULL\n");
}
}

return 0;
}
17 changes: 17 additions & 0 deletions prog1/implementacoes/uri/1075.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include<stdio.h>


int main (){
int n;
int i;

scanf("%d", &n);

for (i=0; i< 10000; i++){
if (i % n == 2){
printf("%d\n", i);
}
}

return 0;
}

0 comments on commit 79662fb

Please sign in to comment.