ramontricolor12

LISTA 03 - Exercício 37

Jun 28th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. /* CABEÇALHO
  2.    Arquivo: LISTA 03 - Exercicio 37.c
  3.    Objetivo: Desenhe uma piramide de asteriscos.
  4.    Autor(a): Ramon Borges
  5.  */
  6.  
  7.  #include <stdio.h>
  8.  int main()
  9.  {
  10.      int i, j, linhas;
  11.  
  12.      printf("\nInforme o numero de linhas: ");
  13.      scanf("%d", &linhas);
  14.  
  15.      for(i = 1; i <= linhas; i++)
  16.      {
  17.          for(j = 1; j <= i; j++)
  18.          {
  19.              printf("*");
  20.          }
  21.          printf("\n");
  22.      }
  23.      return 0;
  24.  }
Advertisement
Add Comment
Please, Sign In to add comment