ramontricolor12

LISTA 03 - Exercício 41

Jun 28th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. /* CABEÇALHO
  2.    Arquivo: LISTA 03 - Exercicio 41.c
  3.    Objetivo: Desenhe uma piramide de asteriscos.
  4.    Autor(a): Ramon Borges
  5.  */
  6.  
  7.  #include <stdio.h>    // falta terminar!!!
  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 = (linhas-1)/2; j > 0; j--)
  18.          {
  19.              printf(" ");
  20.          }
  21.          for(j = ; j <= 1; j++)
  22.             printf("*");
  23.          printf("\n");
  24.      }
  25.      return 0;
  26.  }
Advertisement
Add Comment
Please, Sign In to add comment