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
/* Construir um algoritmo para imprimir a série de FIBONACCI até o 10º termo. | |
* A série de FIBONACCI é formada pela sequência: | |
*0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55... | |
*/ | |
package cap14; | |
public class Exercicio02 { | |
public static void main(String[] args){ | |
int num1 = 1, num2 = 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
{ | |
"accept": "*/*", | |
"host": "smee.io", | |
"user-agent": "GitHub-Hookshot/9b97f8a", | |
"max-forwards": "10", | |
"x-github-delivery": "96a80720-f0c2-11ee-9b0a-b980f6ca0037", | |
"x-github-event": "pull_request", | |
"x-github-hook-id": "470162148", | |
"x-github-hook-installation-target-id": "111815790", | |
"x-github-hook-installation-target-type": "organization", |
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
/* 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){ |
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
/* | |
* Leia um vetor de 20 posições | |
* leia um valor X qualquer | |
* Faça uma busca de X no vetor | |
* informe a posição do vetor que X foi encontrado | |
* ou diga que não foi encontrado | |
*/ | |
package vetores; | |
import java.util.Scanner; |
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
/* | |
* 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 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 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
// Reason to create this script: | |
// My profile was created in portuguese, but when I translated | |
// it to english and tried to save my profile as PDF, it could not | |
// translate some words and dates to english, so I created this gist | |
// as an alternative. | |
// Usage | |
// 1. open your public profile in an incognito* browser tab. E.g.: https://www.linkedin.com/in/marioluan | |
// 2. copy-n-past the code below into the browser console | |
// 3. save as PDF |
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
/* | |
* 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 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 algoritmo que receba vários números positivos e que calcule e mostre: | |
* a soma dos números digitados | |
* a quantidade de números digitados | |
* a média dos números digitados | |
*/ | |
package lacosdowhile; | |
import java.util.Scanner; |
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
/* | |
* 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){ |
NewerOlder