Guest User

Untitled

a guest
Jan 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <stdlib.h>
  4.  
  5. int main()
  6. {
  7. int a,i,j,k,m;
  8. printf("Triangulo de numeros en decremento e incremento\nProporcione la dimension del triangulo\n");
  9. scanf("%i",&a);
  10.  
  11. for(k=a;k>=1;k--){
  12. for(m=1;m>=k;m++)
  13. printf(" %i ",k);
  14.  
  15. printf(" %i ",m);
  16. }
  17. printf("\n");
  18.  
  19.  
  20. /*
  21. for(i=1;i<=a;i++){
  22. for(j=1;j<=i;j++)
  23. if(j!=1)
  24.  
  25. printf("%i ",j);
  26. else(j==1);
  27.  
  28. printf("\n");
  29. }
  30. printf("\n");*/
  31.  
  32.  
  33.  
  34. system("PAUSE");
  35. return 0;
  36. }
Add Comment
Please, Sign In to add comment