Question
(Basic C-programming) Hello, the program below creates a pascal's triangle, where the lo ng fun(int y) calculates the factorial whenever the function is called. x
(Basic C-programming) Hello, the program below creates a pascal's triangle, where the long fun(int y) calculates the factorial whenever the function is called. x and z are for loop control and y has been defined to store the number of rows entered by the user.
My question is, what should the code be so I can change the spacing between each number on the triangle? I want the spacing between each number on the pascal's triangle to be 6 characters long, but I still want the number displayed in the last column always to be at the start of the line.
Example:
MY CODE:
#include
for( z = 1 ; z
return ( result ); } int main() { int x, y, z; printf("Input the number of rows in Pascal's triangle: "); scanf("%d",&y); for ( x = 0 ; x
printf(" "); } return 0; }
Please help ASAP. Thanks!!!
Enter the number ofrows: 6 2 1 1 1 4 6 4 5 10 10 5 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started