Question
Please, Using C, not C+ or C++, Thanks. Files to submit: pascal.c Time it took Matthew to Complete: 20 mins Requriements Program must compile with
Please, Using C, not C+ or C++, Thanks.
Files to submit: pascal.c
Time it took Matthew to Complete: 20 mins
Requriements
Program must compile with both -Wall and -Werror options enabled
Submit only the files requested
Use doubles to store real numbers
Print all doubles to 2 decimal points unless stated otherwise
Restrictions
No global variables may be used
Your main function may only declare variables and call other functions
NEW: You may only use the integer type when solving this problem
Using doubles will result in a 0
Using long long will result in a 0
NEW: You may not use the combinations approach to solve this problem
Think about what you do by hand and come up with a solution that follows that pattern
Description
Write a program that will display Pascal's Triangle up to a specified level. If you don't know what it is you can find the Wikipedia Article on it here: https://en.wikipedia.org/wiki/Pascal%27s_triangle
Details
The maximum level that you will have to display is 28
Assumptions
All input will be valid
Hints
Think about how you solve this problem by hand and then have the computer do the same. The animation on the right of the Wikipedia page can provide you great insight into how to do this.
Examples
User input has been underlined.
Example 1
Please enter how many levels of Pascal's Triangle you would like to see: 2 1 1 1
Example 2
Please enter how many levels of Pascal's Triangle you would like to see: 4 1 1 1 1 2 1 1 3 3 1
Step 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