Question: COMPUTER PROGRAMMING. FUNCTIONS in C (specifically Data Abstraction). -I am using a Dev-C++ software compiler. Problem: This is my function code: void parksideTria(int size, int

COMPUTER PROGRAMMING.

FUNCTIONS in C (specifically Data Abstraction).

-I am using a Dev-C++ software compiler.

Problem:

COMPUTER PROGRAMMING. FUNCTIONS in C (specifically Data Abstraction). -I am using a

This is my function code: void parksideTria(int size, int seed) { int triangle[size][size]; int i, j, count = seed;

if (size 10 || seed 9) { printf("Invalid input. Please enter a size between 1 and 10 and a seed between 1 and 9. "); return; }

for (i = 0; i 9) { count = 1; } } } }

for (i = 0; i

And this is the call in main function: printf(" SIZE N= "); scanf("%d", &size); printf(" SEED S= "); scanf("%d", &seed); parksideTria(size, seed); This is the output of that code: 1 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 The output of my code is wrong. Please edit my code or make a new one that could generate the correct output shown on the Problem.

Thank you so much in advance!

void parksideTria(int size,int seed) \{ I* PARKSIDE'S TRIANGLE PARKSIDE'S TRIANGLE is generated from two numbers -- the size and the seed. The size determines how many rows are in the triangle, and the seed determines the first number in the triangle. For example, here are two PARKSIDE TRIANGLES: SIZE N=6, SEED S=1 SIZE N=5, SEED S=3 Analyze the above examples, discover the rule, and write a program that will generate PARKSIDE'S TRIANGLE given any size N (1-10 only) and any seed S (1-9 only). Test your program by generating PARKSIDE'S TRIANGLE for N=6,S=1 and N=7,S=9. define this function to display the parkside's triangle given the size and seed as input parameters

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!