Question: C program (50pts) Write a C program with no named packages that accepts one command line argument assumed to be a positive integer N. The

C program
C program (50pts) Write a C program with no named packages that

(50pts) Write a C program with no named packages that accepts one command line argument assumed to be a positive integer N. The program should generate widths and heights (random integers between 5 and 100 inclusive) for some rectangles and print the widths and heights and areas for those rectangles whose area is greater than 2022. The program should stop generating the rectangles once N rectangles have been printed and finally report how many rectangles are discarded because their area is not greater than 2022. A sample run can look like the following you can check out the first for loop in the main function of the example program demo function_pointer.c to find out one possible way of generating a random integer in C. A sample run can look like the following: [kwang@computer) (-/temp] $ A3p2 4 Large random rectangle 1: width: 93; height: 19; area: 9207. Large random rectangle 2: width: 82; height: 78; area: 6396. Large random rectangle 3: width: 43; height: 91; area: 3913. Large random rectangle 4: width: 82; height: 50; area: 4100. Number of discarded small rectangles is 7

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!