This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int i; | |
float sum; | |
i = sum = 0; | |
for (i = 1; i <= 100; i++) { | |
sum += (float)1/i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int i, dividendo; | |
float sum; | |
i = sum = 0; | |
for (i = 1, dividendo = 1; i <= 39; i += 2, dividendo *= 2) { | |
sum += (float)i/dividendo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int entrada, i; | |
i = entrada = 0; | |
scanf("%d", &entrada); | |
for (i = 1; i <= entrada; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int x, y, sum, i, entrada, j, k; | |
sum = 0; | |
scanf("%d", &entrada); | |
for (i = 0; i < entrada; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int x, y, sum, i, entrada, j, aux, loops = 0; | |
sum = 0; | |
while(scanf("%d", &entrada) && entrada != 0) { | |
sum = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int entrada, numero, i, j, sum; | |
entrada = numero = i = j = sum = 0; | |
scanf("%d", &entrada); | |
for (i = 0; i < entrada; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int num = 0, prime = 0, rep = 0; | |
int i, j; | |
scanf("%d", &rep); | |
for (j=0; j < rep; j++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) { | |
int i, j, x, entrada, par[5], impar[5], count_par, count_impar; | |
entrada = x = count_impar = count_par = 0; | |
while (x < 15) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
long long int fazFatorial(long long int numero); | |
int main(void) { | |
int numero; | |
int x, y; | |
long long int sum = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int main(void) { | |
int quantidadeCobaias[3]; //0 = c R = 1 S = 2 | |
int quantidadeTotal = 0, entrada = 0, i, cobaiaEntrada = 0; | |
char tipoCobaia; | |
quantidadeCobaias[0] = quantidadeCobaias[1] = quantidadeCobaias[2] = 0; | |
scanf("%d", &entrada); |