SHARE
TWEET

Ejercicio 5.3

seergiomv Dec 9th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. floyd(int i, int j,int k,int tamano){
  3.     k = 1;
  4.     for (i=1; i<=tamano; i++){
  5.         for (j=k; j<=k+i-1; j++){
  6.             printf("%3d",j);}
  7.         printf("\n");
  8.         k=k+i;
  9.     }
  10. }
  11. int main(){
  12.     int tamano,i,j,k;
  13.     printf("TamaƱo del triangulo: ");
  14.     scanf("%d",&tamano);
  15.     floyd(i,j,k,tamano);
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top