From d894012e2041ef8d5007a6ecf070bc5682650302 Mon Sep 17 00:00:00 2001 From: alissonfariias Date: Thu, 31 Oct 2019 12:42:08 -0300 Subject: [PATCH] Add questoes 1074 e 1075 --- prog1/implementacoes/uri/1074.c | 31 +++++++++++++++++++++++++++++++ prog1/implementacoes/uri/1075.c | 17 +++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 prog1/implementacoes/uri/1074.c create mode 100644 prog1/implementacoes/uri/1075.c diff --git a/prog1/implementacoes/uri/1074.c b/prog1/implementacoes/uri/1074.c new file mode 100644 index 00000000..bcf3f239 --- /dev/null +++ b/prog1/implementacoes/uri/1074.c @@ -0,0 +1,31 @@ +#include +#include + +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; +} diff --git a/prog1/implementacoes/uri/1075.c b/prog1/implementacoes/uri/1075.c new file mode 100644 index 00000000..dd909162 --- /dev/null +++ b/prog1/implementacoes/uri/1075.c @@ -0,0 +1,17 @@ +#include + + +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; +}