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
import java.util.Scanner; | |
/** | |
* Informacoes uteis no final do codigo. | |
*/ | |
public class PinturaDoGalpaoFixoV2 { | |
public static void main (String[] args) { | |
//dimensoes do galpao | |
int comprimento; | |
int largura; | |
int altura; |
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
public class AulaWhile { | |
public static void main(String[] args) { | |
System.out.println("\n===================="); | |
System.out.println("= Atividades ="); | |
System.out.println("====================\n"); | |
// Questão 1 | |
System.out.println("Some os numeros de 3 a 10:"); | |
int soma = 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
public class Lista { | |
public static void main(String[] args) { | |
int num; //tamanho do X | |
int qtdParagrafo; //quantidade de espaços antes de cada linha | |
String paragrafo = ""; //String do paragrafo | |
int qtdEspacosInterior; //quantidade de espaços entre cada braço do X | |
String espacoInterior = ""; //String do espaço entre os braços | |
int linhas; //quantidade de linhas antes e depois do meio | |
Scanner leitor = 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
public class Questao4 { | |
public static void main(String[] args) { | |
String jogoDaVelha[][] = { | |
{"X","O","X"}, | |
{"O","X","O"}, | |
{"O","X","X"} | |
}; | |
if (isJogoCompleto(jogoDaVelha)) | |
System.out.println("Sequencia completa."); | |
else |
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
public class Questao5 { | |
public static void main(String[] args) { | |
int[][] matriz = { | |
{1,2,3,9,10}, | |
{1,7,8,9,10}, | |
{1,0,0,9,10}, | |
{1,3,8,9,10} | |
}; | |
int[] colunasComElementosIguais = retornaNumeroColunasIguais(matriz); |
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
import java.util.Random; | |
import java.util.Scanner; | |
/** | |
* @author Wagner Bonfim | |
*/ | |
public class Questao6 { | |
public static void main(String[] args) { | |
String[][] jogoDaVelha = criaMatriz(); | |
Scanner leitor = 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
import java.util.Scanner; | |
/** | |
* @author Wagner Bonfim | |
*/ | |
public class Questao7 { | |
public static void main(String[] args) { | |
Scanner leitor = new Scanner(System.in); | |
boolean rodaPrograma = true; | |
double[][] notasBimestrais = new double[3][4]; |
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
import java.util.Scanner; | |
/** | |
* @author Wagner Bonfim | |
*/ | |
public class Questao8 { | |
public static void main(String[] args) { | |
Scanner leitor = new Scanner(System.in); | |
int[][] matriz = { | |
{0,0,0,0,0,0}, | |
{0,0,0,0,0,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
import java.util.Scanner; | |
/** | |
* @author Wagner Bonfim | |
*/ | |
public class Questao9 { | |
public static void main(String[] args) { | |
Scanner leitor = new Scanner(System.in); | |
boolean rodarPrograma = true; | |
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
public class Questao10_v4 { | |
public static void main(String[] args) { | |
int[][] tabuleiro = { | |
/* Lado Branco */ | |
//0,1,2,3,4,5,6,7 | |
//B,P,B,P,B,P,B,P | |
/*0 B*/ {0,0,0,0,0,0,0,0}, | |
/*1 P*/ {0,0,0,0,0,0,0,0}, | |
/*2 B*/ {0,0,0,0,0,0,0,0}, | |
/*3 P*/ {0,0,0,0,0,0,0,0}, |
OlderNewer