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
/* | |
* Faça um programa em java que faça a leitura de X temperaturas | |
* calcule a temperatura média | |
* contabiliza quantas temperaturas estão acima da média | |
*/ | |
package vetores; | |
import java.util.Scanner; | |
public class Exercicio03 { |
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
/* | |
* Declare um vetor de 10 posições | |
* preencha com os 10 primeiros números ímpares | |
* escreva na tela o resultado | |
*/ | |
package vetores; | |
public class Exercicio02 { | |
public static void main(String[] args){ |
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
/* | |
* Construir um programa em java que faça a leitura | |
* de 10 números e os imprima na ordem inversa que foram lidos | |
*/ | |
package vetores; | |
import java.util.Scanner; | |
public class Exercicio01 { | |
public static void main(String[] args){ |
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
/* | |
* Digite X números e informe quantos números pares/ímpares foram digitados. | |
*/ | |
package cap14; | |
import java.util.Scanner; | |
public class Exercicio08 { | |
public static void main(String[] argss){ | |
Scanner ent = new Scanner(System.in); |
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
/* | |
* Dado x números entre 0 e 100, apresente a média, o maior e o menor número digitado. | |
* Caso o usuário digite um número diferente do solicitado no intervalo, | |
* peça para informar outro número. | |
*/ | |
package cap14; | |
import java.util.Scanner; | |
public class Exercicio07 { |
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
/* | |
* Faça um programa que informe se um dado ano é bissexto ou não. | |
* Repira essa operação 15 vezes. | |
* | |
* Obs: um ano é bissexto se ele for divisível por 400 ou se ele for divisível por 4 e não por 100. | |
*/ | |
package cap14; | |
import java.util.Scanner; |
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
/* | |
* Faça um programa de cálculo de potência que solicite dois números (n e m) | |
* e faça o cálculo de n^m. Repita esse cálculo até o usuário digitar n = 0. | |
*/ | |
package cap14; | |
import java.util.Scanner; | |
public class Exercicio04 { | |
public static void main(String[] args){ |
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
/* | |
* Faça um programa que calcule o fatorial de um número inteiro. | |
* Repita a operação de cálculo X vezes. | |
*/ | |
package cap14; | |
import java.util.Scanner; | |
public class Exercicio03 { |
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
/* | |
* Faça um programa que dê o conteito do aluno conforme sua nota média. | |
* | |
* Entrada: 3 notas | |
* Saída: média das notas e o conceito | |
* | |
* caso 0 <= média < 4 -> Nota E | |
* caso 4 <= média < 5 -> Nota D | |
* caso 5 <= média < 7 -> Nota C | |
* caso 7 <= média < 8 -> Nota B |
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
/* só pode ser utilizada com os seguintes tipos: | |
* byte, short, char, int e String. | |
* Ótima opção para fazer Menus. | |
*/ | |
package condicional; | |
import java.util.Scanner; | |
public class Switch { | |
public static void main(String[] args){ |