nikolas_serafini

Lista 3 - Exercício 38

Jun 15th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int i,j,lines,counter = 1;
  6.  
  7.     printf("Entre com a quantidade de linhas :\n"); scanf("%d",&lines);
  8.  
  9.     for (i = 0; i < lines; i++)
  10.     {
  11.         for (j = 0; j <= i; j++)
  12.         {
  13.             printf("%d ",counter);
  14.         }
  15.         counter++;
  16.         printf("\n");
  17.     }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment