Created
May 13, 2012 04:53
-
-
Save douglasiacovelli/2681457 to your computer and use it in GitHub Desktop.
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
class Teste{ | |
public static void main (String args[]) { | |
int linhas = 30; | |
//int pontos = 2*linhas+1; | |
//escreve as linhas | |
for (int i = 0;i<linhas;i++){ | |
int pontos = 2*i+1; | |
//escreve os epaços | |
for(int space=0;space<(linhas-(i+1))*2;space++){ | |
System.out.print(" "); | |
} | |
//fazer os pontos | |
for (int j = 1;j<=pontos;j++){ | |
System.out.print ("*" + " "); | |
} | |
System.out.println(" "); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment