triangulo
C
int i, j, n;
//i = filas
//j = columnas
int espacios, asteriscos;
/*
n: 5 espacios asteriscos
....*.... 4 1
*** 3 3
***** 2 5
******* 1 7
********* 0 9
espacios = de n - 1 a 0 de 1 en 1
asteriscos: de 1 a 2n - 1 de 2 en 2
*/
printf("\n");
n = 5;
espacios = n - 1;
asteriscos = 1;
for(i = 1; i <= n; i++){
//separamos la parte de las columnas dos partes: espacios y asteriscos
for(j = 1; j <= espacios; j++){
printf(" ");
}
for(j = 1; j <= asteriscos; j++){
printf("*");
}
espacios--;
asteriscos = asteriscos + 2;
printf("\n");
}
Also in C:
- Title
- limit of integer in c
- Category
- C
- Title
- can we write a program without main in c
- Category
- C
- Title
- c substring
- Category
- C
- Title
- changing tuple values
- Category
- C
- Title
- double return type in c
- Category
- C
- Title
- error 403
- Category
- C
- Title
- c matrix sintax
- Category
- C
- Title
- what is restrict keyword in c
- Category
- C
- Title
- es fibo
- Category
- C
- Title
- ModuleNotFoundError: No module named 'cv2'
- Category
- C
- Title
- typedef vs #define
- Category
- C
- Title
- jock cranley
- Category
- C
- Title
- malloc in c
- Category
- C
- Title
- code: 'EADDRINUSE', [0] errno: 'EADDRINUSE', [0] syscall: 'listen', [0] address: '::', [0] port: 5000
- Category
- C
- Title
- printf n characters c
- Category
- C
- Title
- select all file from date powershell
- Category
- C
- Title
- error: dereferencing pointer to incomplete type
- Category
- C
- Title
- how to download file in powershell
- Category
- C
- Title
- a enum data type in c
- Category
- C
- Title
- turn a char array into double C
- Category
- C
- Title
- printf("%3d ",XX);
- Category
- C
- Title
- tmux how to kill all sessions
- Category
- C
- Title
- File "h5py\h5g.pyx", line 161, in h5py.h5g.create ValueError: Unable to create group (name already exists)
- Category
- C
- Title
- how to free a 2d array correctly
- Category
- C
- Title
- windowns 10 allow ping
- Category
- C
- Title
- declare variable in c
- Category
- C
- Title
- debian install npm
- Category
- C
- Title
- diferencia entre * y & en c
- Category
- C
- Title
- c bit access union
- Category
- C
- Title
- PS1 modified lags
- Category
- C
- Title
- is c and c++ platform independent
- Category
- C
- Title
- reset style matplotlib
- Category
- C
- Title
- qtableview get selected row
- Category
- C
- Title
- v
- Category
- C
- Title
- potencia recursiva
- Category
- C
- Title
- iterar en map
- Category
- C
- Title
- how can i remove a specific item from an array
- Category
- C
- Title
- remove an element from a set
- Category
- C
- Title
- read files in c
- Category
- C
- Title
- how to declare 2 d array using malloc
- Category
- C
- Title
- error: ‘cout’ was not declared in this scope
- Category
- C
- Title
- prime number
- Category
- C
- Title
- add border to image android
- Category
- C
- Title
- code in c skipping over scanf
- Category
- C
- Title
- coin row problem in linear time
- Category
- C
- Title
- c fill 2d array
- Category
- C
- Title
- vue cdn
- Category
- C
- Title
- Switch Mode C Programming
- Category
- C
- Title
- struct in C
- Category
- C
- Title
- buscar caracter
- Category
- C
- Title
- check if string in string c
- Category
- C
- Title
- azure storage emulator config
- Category
- C
- Title
- c printf right pad with space
- Category
- C
- Title
- resto de division recursiva
- Category
- C
- Title
- strtoul C
- Category
- C
- Title
- scanf read line
- Category
- C
- Title
- tar cmd
- Category
- C
- Title
- division recursiva
- Category
- C
- Title
- delete string function in c
- Category
- C
- Title
- tkinter create_line
- Category
- C
- Title
- /usr/bin/mandb: fopen /var/cache/man/7935: Permission denied
- Category
- C
- Title
- where is /dev/kvm
- Category
- C
- Title
- c radians
- Category
- C
- Title
- what are the causes of memory leaks in c
- Category
- C
- Title
- Assign integer value to pointer?
- Category
- C
- Title
- c vs python
- Category
- C
- Title
- delete docker image repository none
- Category
- C
- Title
- python web crawler
- Category
- C
- Title
- -> operator
- Category
- C
- Title
- stack implementation
- Category
- C
- Title
- for loop in c
- Category
- C
- Title
- how to print in c
- Category
- C
- Title
- use of matplotlib inline
- Category
- C
- Title
- c isdigit function
- Category
- C
- Title
- declaring a volatile in c
- Category
- C
- Title
- incompatible types when initializing type ‘float’ using type ‘point {aka struct point}’
- Category
- C
- Title
- hentai clochette
- Category
- C
- Title
- CL/cl.h: No such file or directory
- Category
- C
- Title
- docker images command
- Category
- C
- Title
- 233 pounds to inr
- Category
- C
- Title
- how to globally initlailize a struct
- Category
- C
- Title
- piramide
- Category
- C
- Title
- what is stdin in c
- Category
- C
- Title
- strrev in c
- Category
- C
- Title
- heitai bestial
- Category
- C
- Title
- typedef in c
- Category
- C
- Title
- Declaring Variables in C
- Category
- C
- Title
- find string in all files powershell
- Category
- C
- Title
- function in c
- Category
- C
- Title
- docker pull command
- Category
- C
- Title
- how to do Employing defensive code in the UI to ensure that the current frame is the most top level window
- Category
- C
- Title
- c program to find the sum of given number
- Category
- C
- Title
- time now c
- Category
- C
- Title
- root in C
- Category
- C
- Title
- How to setup a line length marker in vim
- Category
- C
- Title
- how to put a struct in another struct C
- Category
- C
- Title
- docker run port mapping
- Category
- C
- Title
- how to remove \n from a string c
- Category
- C
- Title
- excel cell blank or zero
- Category
- C
- Title
- sum of arrays
- Category
- C