Skip to content

Instantly share code, notes, and snippets.

@douglasiacovelli
Created May 13, 2012 04:53
Show Gist options
  • Save douglasiacovelli/2681457 to your computer and use it in GitHub Desktop.
Save douglasiacovelli/2681457 to your computer and use it in GitHub Desktop.
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