nikolas_serafini

Lista 3 - Exercício 39

Jun 15th, 2013
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 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.             counter++;
  15.         }
  16.         counter = 1;
  17.         printf("\n");
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment