Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gmendonca committed Sep 20, 2014
1 parent 1776167 commit 0627006
Show file tree
Hide file tree
Showing 197 changed files with 5,960 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 1001.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>

using namespace std;

int main(){
int a, b;

cin >> a;
cin >> b;

cout << "X = " << a+b << endl;
return 0;
}
15 changes: 15 additions & 0 deletions 1002.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
int r;
float pi = 3.14159;

while(cin >> r){
printf("A=%0.4f\n",r*r*pi);
}

return 0;
}
13 changes: 13 additions & 0 deletions 1003.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>

using namespace std;

int main(){
int a,b;

cin >> a;
cin >> b;

cout << "SOMA = " << a+b << endl;
return 0;
}
13 changes: 13 additions & 0 deletions 1004.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>

using namespace std;

int main(){
int a,b;

cin >> a;
cin >> b;

cout << "PROD = " << a*b << endl;
return 0;
}
14 changes: 14 additions & 0 deletions 1005.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
float a,b;

cin >> a;
cin >> b;

printf("MEDIA = %.5f\n", (a*3.5 + b*7.5)/(7.5+3.5));
return 0;
}
15 changes: 15 additions & 0 deletions 1006.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
float a,b,c;

cin >> a;
cin >> b;
cin >> c;

printf("MEDIA = %.1f\n", (a*2 + b*3 + c*5)/(2+3+5));
return 0;
}
18 changes: 18 additions & 0 deletions 1007.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
int a, b, c, d;

cin >> a;
cin >> b;
cin >> c;
cin >> d;

int r = (a*b - c*d);
printf("DIFERENCA = %d\n",r);

return 0;
}
18 changes: 18 additions & 0 deletions 1008.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
int a, b;
float c;

cin >> a;
cin >> b;
cin >> c;

cout << "NUMBER = " << a << endl;
printf("SALARY = U$ %.2f\n", b*c);

return 0;
}
17 changes: 17 additions & 0 deletions 1009.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
float f1, f2, f3;
char name[256];

cin.getline(name,256);
cin >> f1;
cin >> f2;
f3 = f1 + (0.15*f2);
printf("TOTAL = R$ %0.2f\n",f3);

return 0;
}
18 changes: 18 additions & 0 deletions 1010.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <iostream>
#include <stdio.h>


int main(){

int a,b,c,d;
float e,f;

std::cin >> a >> b >> e;
std::cin >> c >> d >> f;

printf("VALOR A PAGAR: R$ %.2f\n", b*e + d*f);
return 0;
}



14 changes: 14 additions & 0 deletions 1011.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>
#include <stdio.h>
#include <math.h>


int main(){

int a;

std::cin >> a;

printf("VOLUME = %.3f\n", (4.0/3.0)*3.14159*pow(a,3));
return 0;
}
23 changes: 23 additions & 0 deletions 1012.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
float a,b,c;
float pi = 3.14159;

cin >> a;
cin >> b;
cin >> c;

printf("TRIANGULO: %.3f\n", (a*c)/2);
printf("CIRCULO: %.3f\n", pi*c*c);
printf("TRAPEZIO: %.3f\n", ((a+b)*c)/2);
printf("QUADRADO: %.3f\n", b*b);
printf("RETANGULO: %.3f\n", a*b);

return 0;
}


22 changes: 22 additions & 0 deletions 1013.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <iostream>

using namespace std;

int main(){
int a, b, c, aux;

aux = 0;

cin >> a >> b >> c;

if(a > b)
aux = a;
else
aux = b;
if(aux > c)
aux = aux;
else
aux = c;
cout << aux << " eh o maior\n";
return 0;
}
14 changes: 14 additions & 0 deletions 1014.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>
#include <stdio.h>

int main(){

int a;
float b;

std::cin >> a;
std::cin >> b;

printf("%.3f km/l\n", a/b);
return 0;
}
16 changes: 16 additions & 0 deletions 1015.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>
#include <stdio.h>
#include <math.h>

using namespace std;

int main(){
int x1, y1, x2, y2;

cin >> x1 >> y1;
cin >> x2 >> y2;

printf("%.4f\n", sqrt(pow(x2-x1,2)+pow(y2-y1,2)));

return 0;
}
12 changes: 12 additions & 0 deletions 1016.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>
#include <stdio.h>

int main(){

int a;

std::cin >> a;

printf("%d minutos\n", (a*60)/30);
return 0;
}
18 changes: 18 additions & 0 deletions 1017.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <iostream>
#include <stdio.h>

using namespace std;

int main(){
int a, b;
cin >> a;
cin >> b;

float f = (a*b)/12.0;

printf("%.3f\n", f);

return 0;

}

25 changes: 25 additions & 0 deletions 1018.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include <iostream>

using namespace std;

int main(){
int inteiro, aux;

cin >> inteiro;

cout << inteiro <<"\n";
cout << inteiro/100 << " nota(s) de R$ 100,00\n";
aux = (inteiro%100);
cout << aux/50 << " nota(s) de R$ 50,00\n";
aux = (aux%50);
cout << aux/20 << " nota(s) de R$ 20,00\n";
aux = (aux%20);
cout << aux/10 << " nota(s) de R$ 10,00\n";
aux = (aux%10);
cout << aux/5 << " nota(s) de R$ 5,00\n";
aux = (aux%5);
cout << aux/2 << " nota(s) de R$ 2,00\n";
aux = (aux%2);
cout << aux/1 << " nota(s) de R$ 1,00\n";
return 0;
}
13 changes: 13 additions & 0 deletions 1019.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>

using namespace std;

int main(){
int a;

cin >> a;

cout << a/3600 << ":" << (a%3600)/60 << ":" << a%60 << endl;

return 0;
}
14 changes: 14 additions & 0 deletions 1020.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>

using namespace std;

int main(){
int a;

cin >> a;

cout << a/365 << " ano(s)" << endl;
cout << (a%365)/30 << " mes(es)" << endl;
cout << (a%365)%30 << " dia(s)" << endl;
return 0;
}
44 changes: 44 additions & 0 deletions 1021.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#include <iostream>

using namespace std;

int main(){
float N;
int inteiro, aux, aux1;

cin >> N;

inteiro = N;
N = 100*N;
aux1 = N;


cout << "NOTAS:\n";
cout << inteiro/100 << " nota(s) de R$ 100.00\n";
aux = (inteiro%100);
cout << aux/50 << " nota(s) de R$ 50.00\n";
aux = (aux%50);
cout << aux/20 << " nota(s) de R$ 20.00\n";
aux = (aux%20);
cout << aux/10 << " nota(s) de R$ 10.00\n";
aux = (aux%10);
cout << aux/5 << " nota(s) de R$ 5.00\n";
aux = (aux%5);
cout << aux/2 << " nota(s) de R$ 2.00\n";
aux = (aux%2);
cout << "MOEDAS:\n";
cout << aux/1 << " moeda(s) de R$ 1.00\n";

aux1 = aux1%100;
cout << aux1/50 << " moeda(s) de R$ 0.50\n";
aux1 = aux1%50;
cout << aux1/25 << " moeda(s) de R$ 0.25\n";
aux1 = aux1%25;
cout << aux1/10 << " moeda(s) de R$ 0.10\n";
aux1 = aux1%10;
cout << aux1/5 << " moeda(s) de R$ 0.05\n";
aux1 = aux1%5;
cout << aux1/1 << " moeda(s) de R$ 0.01\n";
system("PAUSE");
return 0;
}
Loading

0 comments on commit 0627006

Please sign in to comment.