-
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.
Commitando Lista Resolvida do T1 de POO.
- Loading branch information
Showing
38 changed files
with
349 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 @@ | ||
|
Binary file not shown.
Binary file not shown.
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,25 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double nota1, nota2, nota3, media; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Digite a primeira nota: "); | ||
nota1=sc.nextDouble(); | ||
|
||
System.out.println("Digite a segunda nota: "); | ||
nota2=sc.nextDouble(); | ||
|
||
System.out.println("Digite a terceira nota: "); | ||
nota3=sc.nextDouble(); | ||
|
||
media = (nota1+nota2+nota3)/3; | ||
|
||
System.out.println("A média é "+media); | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q_02r { | ||
} |
Binary file not shown.
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,34 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double nota1, nota2, nota3, peso1, peso2, peso3; | ||
|
||
Scanner sc = new Scanner(System.in); | ||
System.out.println("Digite sua nota 1: "); | ||
nota1=sc.nextDouble(); | ||
|
||
System.out.println("Digite o peso da nota 1: "); | ||
peso1=sc.nextDouble(); | ||
|
||
System.out.println("Digite sua nota 2: "); | ||
nota2=sc.nextDouble(); | ||
|
||
System.out.println("Digite o peso da nota 2: "); | ||
peso2=sc.nextDouble(); | ||
|
||
System.out.println("Digite sua nota 3: "); | ||
nota3=sc.nextDouble(); | ||
|
||
System.out.println("Digite o peso da nota 3: "); | ||
peso3=sc.nextDouble(); | ||
|
||
double MediaPonderada = (nota1 * peso1 + nota2 * peso2 + nota3 * peso3)/(peso1+peso2+peso3); | ||
|
||
System.out.println("Sua m�dia foi: "+ MediaPonderada); | ||
} | ||
|
||
} |
Binary file not shown.
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 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
System.out.println ("Digite seu sal�rio atual: "); | ||
double salario = sc.nextDouble (); | ||
double novoSalario = salario + (salario*25/100); | ||
|
||
System.out.println ("Seu novo sal�rio �: " + novoSalario); | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
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,2 @@ | ||
[.ShellClassInfo] | ||
LocalizedResourceName=q_11 |
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,33 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
// TODO Auto-generated method stub | ||
|
||
int num; | ||
double quad; | ||
double cubo; | ||
double r2; | ||
double r3; | ||
|
||
Scanner sc = new Scanner ( System.in); | ||
System.out.println("Qual número você deseja para realizaar as seguintes opeações? " + " \nPotência ao quadrado; \nPotência ao cubo; \nRaíz quadrda; \nRáiz cúbica."); | ||
num = sc.nextInt(); | ||
|
||
//Calculo Potência ao quadrado: | ||
|
||
quad = (double) Math. pow(num,2); | ||
System.out.println ("Os resultado da potência ao quadrado é: " + quad); | ||
cubo = (double) Math. pow(num,3); | ||
System.out.println ("Os resultado da potência ao cubo é: " + cubo); | ||
r2 = (double) Math. sqrt(num); | ||
System.out.println ("Os resultado da raiz quadrada é: " + r2); | ||
r3 = (double) Math. cbrt(num); | ||
System.out.println ("Os resultado da raiz cúbica é: " + r3); | ||
} | ||
} | ||
} | ||
|
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q11_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,22 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double pes, polegadas, jardas, milhas; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Digite o valor de pés: "); | ||
pes=sc.nextDouble(); | ||
|
||
polegadas = pes * 12; | ||
jardas = pes / 3; | ||
milhas = jardas / 1760; | ||
|
||
System.out.println("Com essa quantidade de pés obtemos "+polegadas+" polegadas, "+jardas+" jardas e "+milhas+" milhas."); | ||
|
||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q13_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,32 @@ | ||
package br.edu.principal; | ||
import java.util.Scanner; | ||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
//RECEBER VALORES: | ||
|
||
Scanner sc = new Scanner (System.in); | ||
System.out.println ("Digite o preço de fábrica do veículo: "); | ||
double p_fabr = sc.nextDouble (); | ||
|
||
|
||
System.out.println ("Digite o percentual de lucro do distribuidor do vepiculo: "); | ||
double perc_d = sc.nextDouble (); | ||
|
||
System.out.println ("Digite o percentual de impostos aplicados pela fábrica: "); | ||
double perc_i= sc.nextDouble(); | ||
|
||
//CÁLCULOS: | ||
|
||
double vlr_d = p_fabr * (perc_d/100); | ||
System.out.println ("Este é o valor correspondente ao lucro da distribuidora do véculo: " + vlr_d); | ||
|
||
double vlr_i = p_fabr * (perc_i/100); | ||
System.out.println ("Este é o valor correspondente aos impostos do veículo: " + vlr_i); | ||
|
||
double p_final = p_fabr + vlr_d + vlr_i; | ||
System.out.println ("Este é o valor correspondente ao preço final do véculo é: " + p_final); | ||
|
||
} | ||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q15_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,24 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double ang, alt, escada, radiano; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Digite o ângulo: "); | ||
ang=sc.nextDouble(); | ||
|
||
System.out.println("Digite a altura: "); | ||
alt=sc.nextDouble(); | ||
|
||
radiano = ang * 3.14 / 180; | ||
escada = alt / Math.sin (radiano); //Está dando erro nesse cálculo da escada. | ||
|
||
System.out.println("A medida da escada são "+radiano+" metros."); | ||
System.out.println("A medida da escada são "+escada+" metros."); | ||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q20_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,32 @@ | ||
package br.edu.principal; | ||
import java.util.Scanner; | ||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
System.out.println ("Calculo da distância que a escada deve estar da parede para pendurar um quadro"); | ||
|
||
//RECEBER VARIÁVEIS | ||
|
||
Scanner sc = new Scanner (System.in); | ||
|
||
System.out.println("\nDigite a altura da escada utilizada: "); | ||
double tam_escada = sc.nextDouble(); | ||
|
||
System.out.println("\nDigite a altura que você deseja pendurar o quadro: "); | ||
double alt_quadro = sc.nextDouble(); | ||
|
||
// CALCULAR DISTÂNCIA ESCADA | ||
|
||
if (alt_quadro > tam_escada) { | ||
System.out.println("Compre uma escada maior."); | ||
} | ||
else { | ||
double dist_esc = (Math.pow(tam_escada, 2) - Math.pow(alt_quadro, 2)); | ||
dist_esc = Math.sqrt(dist_esc); | ||
System.out.println( "\nA distância que a escada deve estar da parede é: " + dist_esc); | ||
} | ||
|
||
|
||
} | ||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q21_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,28 @@ | ||
package br.edu.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
double vlr_sal, qtd_kw, vlr_kw, vlr_reais, desc, vlr_desc; | ||
Scanner sc = new Scanner(System.in); | ||
|
||
System.out.println("Qual o valor do salário mínimo? "); | ||
vlr_sal=sc.nextDouble(); | ||
|
||
System.out.println("Qual a quantidade de quilowatts consumida pela residência? "); | ||
qtd_kw=sc.nextDouble(); | ||
|
||
vlr_kw = vlr_sal / 5; | ||
vlr_reais = vlr_kw * qtd_kw; | ||
desc = vlr_reais * 15/100; | ||
vlr_desc = vlr_reais - desc; | ||
|
||
System.out.println("Cada quilowatt vale R$"+vlr_kw+" .");//permanece esse ponto no final? | ||
System.out.println("O valor a ser pago pela residência é de R$"+vlr_reais+" ."); | ||
System.out.println("O valor a ser pago com o desconto de 15% é de R$"+vlr_desc+" ."); | ||
|
||
} | ||
|
||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author Dell | ||
* | ||
*/ | ||
module q22_t1 { | ||
} |
Binary file not shown.
Binary file not shown.
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,29 @@ | ||
package br.ed.principal; | ||
|
||
import java.util.Scanner; | ||
|
||
public class Principal { | ||
|
||
public static void main(String[] args) { | ||
|
||
double custo_esp; | ||
double p_convite; | ||
double qtd_conv; | ||
|
||
//RECEBER VARIÁVEIS | ||
|
||
Scanner sc = new Scanner (System.in); | ||
|
||
System.out.println("Digite o custo total do espetáculo: "); | ||
custo_esp = sc.nextDouble(); | ||
|
||
System.out.println("Digite o preço do ingresso para o espetáculo: "); | ||
p_convite = sc.nextDouble(); | ||
|
||
// CÁLCULOS | ||
|
||
qtd_conv = custo_esp / p_convite; | ||
System.out.println("Quantidade necessária de convites vendidos para cobrir o custo do spetáculo: " + qtd_conv); | ||
|
||
} | ||
} |
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,9 @@ | ||
/** | ||
* | ||
*/ | ||
/** | ||
* @author User | ||
* | ||
*/ | ||
module q25_t1 { | ||
} |