You need to write a program that will draw Pascal's triangle. I tried to write - shows only a half triangle.
#include <stdio.h> #include <conio.h> int main() { int number; scanf("%d", &number); for (int i = 0; i <= number-1; i++) { for (int spacja = 0; spacja <= number; spacja++) { printf(" "); } for (int j = 1; j <= i*2+1; j++) { printf("%d",j); } printf("\n"); } _getch(); return 0; }