Question: Program 17 Pascals Triangle Basic Algorithm (prog17-main.cpp): Ask the user to enter the number of Pascal's Triangle rows (N) to print Echo to the screen
Program 17 "Pascals Triangle Basic Algorithm (prog17-main.cpp): Ask the user to enter the number of Pascal's Triangle rows (N) to print Echo to the screen input Read from user for N, see example below Open output file prog17-Pascal.txt Print value read for N, see example below Prints the first N rows of Pascal's Triangle to open file one row per line. Basic Algorithm (prog17-test.cpp): You will write a second program that will be used to test the functions that you write in prog17-functions.hpp/cpp as you write them. For each function, you will call the function 3x in your test program with different inputs to test the results of your functions. For each test, I want you to report, Example | Testing new library functions: what function you are testing what input values you are passing in expected outcome actual outcome Deliverables prog17-main.cpp prog17-test.cpp prog17-functions.hpp prog17-functions.cpp Good News The best way to construct Pascal's Triangle is to use a nested loop with repeated calls to the combination already written. Sample Input Please Enter The Number of Rows: 10 Sample Output file Please Enter The Number of Rows: 10 Read: 10 Rows 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 1 9 36 84 126 126 84 36 9 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
