Pascal Triangle in C programing
Good day programers, This a simple C program that ask the user to input number of lines he/she want's and generate a pascal triangle starts with one and when the count is greater than two it multiply it self by two, after it reach the half of the triangle it divide it self by two and stop in one(1), this c program is an example of an nested loop, I hope it helps you! Code: #include //dont copy pls.. takes me 2 hours to figure this out.. main() { int n, a, k, number = 1, space = n; printf("Enter number of lines: "); scanf("%d",&n); printf("\n\n"); space = n; for ( a = 1 ; a <= n ; a++ ) { for ( k = space ; k > 1 ; k-- ) printf(" "); ...