-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e2763b6
Showing
159 changed files
with
4,391 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,8 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
printf("Hello World!\n"); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,14 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int A, B, X; | ||
|
||
scanf("%i %i", &A, &B); | ||
|
||
X = A B; | ||
|
||
printf("X = %i\n", X); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,14 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
double raio, area, pi = 3.14159; | ||
|
||
scanf("%lf", &raio); | ||
|
||
area= pi * raio * raio; | ||
|
||
printf("A=%.4lf\n", area); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,17 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int A, B, SOMA; | ||
|
||
scanf("%i", &A); | ||
scanf("%i", &B); | ||
|
||
SOMA = A B; | ||
|
||
printf("SOMA = %i\n", SOMA); | ||
|
||
return 0; | ||
} | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,13 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int A, B, PROD; | ||
|
||
scanf("%i %i", &A, &B); | ||
|
||
PROD = A*B; | ||
|
||
printf("PROD = %i\n", PROD); | ||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,14 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
double A, B, media; | ||
|
||
scanf("%lf %lf", &A, &B); | ||
|
||
media= (A*3.5 B*7.5)/11; | ||
|
||
printf("MEDIA = %.5lf\n", media); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,14 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
double A, B, C, media; | ||
|
||
scanf("%lf %lf %lf", &A, &B, &C); | ||
|
||
media= (A*2 B*3 C*5)/10; | ||
|
||
printf("MEDIA = %.1lf\n", media); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,14 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int A, B, C, D, DIFERENCA; | ||
|
||
scanf("%i %i %i %i", &A, &B, &C, &D); | ||
|
||
DIFERENCA = (A*B - C*D); | ||
|
||
printf("DIFERENCA = %i\n", DIFERENCA); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,16 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int funcionario, horas; | ||
float salario, valor; | ||
|
||
scanf("%i %i %f", &funcionario, &horas, &valor); | ||
|
||
salario= horas * valor; | ||
|
||
printf("NUMBER = %i\n", funcionario); | ||
printf("SALARY = U$ %.2f\n", salario); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,16 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
char nome[50]; | ||
double salario, vendas, total; | ||
|
||
scanf("%s", &nome); | ||
scanf("%lf %lf", &salario, &vendas); | ||
|
||
total= 0.15*vendas salario; | ||
|
||
printf("TOTAL = R$ %.2lf\n", total); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,14 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int c1, n1, c2, n2; | ||
float v1, v2, total; | ||
|
||
scanf("%i %i %f", &c1, &n1, &v1); | ||
scanf("%i %i %f", &c2, &n2, &v2); | ||
|
||
total = n1*v1 n2*v2; | ||
|
||
printf("VALOR A PAGAR: R$ %.2f\n", total); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,13 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
double r, V; | ||
|
||
scanf("%lf", &r); | ||
|
||
V= (4/3.0) * 3.14159 * r * r * r; | ||
|
||
printf("VOLUME = %.3lf\n", V); | ||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,23 @@ | ||
#include <stdio.h> | ||
|
||
int main(){ | ||
float A, B, C; | ||
float Ac, Ar, At, Aq, Atri; | ||
|
||
scanf("%f %f %f", &A, &B, &C); | ||
|
||
Atri= (A*C)/2; | ||
|
||
Ac= C * C * 3.14159; | ||
|
||
At= ((A B)*C)/2; | ||
|
||
Aq= B*B; | ||
|
||
Ar= A*B; | ||
|
||
printf("TRIANGULO: %.3f\nCIRCULO: %.3f\nTRAPEZIO: %.3f\nQUADRADO: %.3f\nRETANGULO: %.3f\n", Atri, Ac, At, Aq, Ar); | ||
|
||
return 0; | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,19 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
int main() | ||
{ | ||
int a, b, c, maior; | ||
|
||
scanf("%i %i %i", &a, &b, &c); | ||
|
||
maior= (a b abs(a-b))/2; | ||
|
||
if(c>maior){ | ||
printf("%i eh o maior\n", c); | ||
} | ||
else{ | ||
printf("%i eh o maior\n", maior); | ||
} | ||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,15 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int X; | ||
float Y, total; | ||
|
||
scanf("%i %f", &X, &Y); | ||
|
||
total= X/Y; | ||
|
||
printf("%.3f km/l\n", total); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,17 @@ | ||
#include <stdio.h> | ||
#include <math.h> | ||
|
||
int main() { | ||
|
||
float x1, y1, x2, y2, distancia; | ||
|
||
scanf("%f %f", &x1, &y1); | ||
scanf("%f %f", &x2, &y2); | ||
|
||
distancia= sqrt(pow(x2-x1,2) pow(y2-y1,2)); | ||
|
||
|
||
printf("%.4f\n", distancia); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,14 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int distancia, conta; | ||
|
||
scanf("%i", &distancia); | ||
|
||
conta= 2*distancia; | ||
|
||
printf("%i minutos\n", conta); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,17 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int horas, VM; | ||
float distancia, litros; | ||
|
||
scanf("%i %i", &horas, &VM); | ||
|
||
distancia= horas*VM; | ||
|
||
litros= distancia/12; | ||
|
||
printf("%.3f\n", litros); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,27 @@ | ||
#include <stdio.h> | ||
|
||
int main() | ||
{ | ||
int N; | ||
|
||
scanf("%i", &N); | ||
|
||
printf("%i\n", N); | ||
|
||
printf("%i nota(s) de R$ 100,00\n", N/100); | ||
N= N%100; | ||
printf("%i nota(s) de R$ 50,00\n", N/50); | ||
N= N%50; | ||
printf("%i nota(s) de R$ 20,00\n", N/20); | ||
N= N%20; | ||
printf("%i nota(s) de R$ 10,00\n", N/10); | ||
N= N%10; | ||
printf("%i nota(s) de R$ 5,00\n", N/5); | ||
N= N%5; | ||
printf("%i nota(s) de R$ 2,00\n", N/2); | ||
N= N%2; | ||
printf("%i nota(s) de R$ 1,00\n", N); | ||
|
||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,18 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int N, horas, minutos, segundos; | ||
|
||
scanf("%i", &N); | ||
|
||
minutos= N/60; | ||
segundos= N%60; | ||
horas= minutos/60; | ||
minutos= minutos%60; | ||
|
||
printf("%i:%i:%i\n", horas, minutos, segundos); | ||
|
||
return 0; | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,16 @@ | ||
#include <stdio.h> | ||
|
||
int main() { | ||
|
||
int idade, anos, meses, dias; | ||
|
||
scanf("%i", &idade); | ||
|
||
anos= idade/365; | ||
meses= (idade%365)/30; | ||
dias= (idade%365)%30; | ||
|
||
printf("%i ano(s)\n%i mes(es)\n%i dia(s)\n", anos, meses, dias); | ||
|
||
return 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,42 @@ | ||
#include <stdio.h> | ||
|
||
int main() | ||
{ | ||
double flot; | ||
int N, centavos; | ||
|
||
scanf("%lf", &flot); | ||
|
||
N= flot; | ||
centavos= flot*100 - N*100; | ||
|
||
printf("NOTAS:\n"); | ||
printf("%i nota(s) de R$ 100.00\n", N/100); | ||
N= N%100; | ||
printf("%i nota(s) de R$ 50.00\n", N/50); | ||
N= N%50; | ||
printf("%i nota(s) de R$ 20.00\n", N/20); | ||
N= N%20; | ||
printf("%i nota(s) de R$ 10.00\n", N/10); | ||
N= N%10; | ||
printf("%i nota(s) de R$ 5.00\n", N/5); | ||
N= N%5; | ||
printf("%i nota(s) de R$ 2.00\n", N/2); | ||
|
||
N= N%2; | ||
printf("MOEDAS:\n"); | ||
printf("%i moeda(s) de R$ 1.00\n", N); | ||
|
||
printf("%i moeda(s) de R$ 0.50\n", centavos/50); | ||
centavos= centavos%50; | ||
printf("%i moeda(s) de R$ 0.25\n", centavos/25); | ||
centavos= centavos%25; | ||
printf("%i moeda(s) de R$ 0.10\n", centavos/10); | ||
centavos= centavos%10; | ||
printf("%i moeda(s) de R$ 0.05\n", centavos/5); | ||
centavos= centavos%5; | ||
printf("%i moeda(s) de R$ 0.01\n", centavos); | ||
|
||
|
||
return 0; | ||
} |
Oops, something went wrong.