Visual Studios 2022 please!

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Visual Studios 2022 please!

Post by answerhappygod »

Visual Studios 2022 please!
Visual Studios 2022 Please 1
Visual Studios 2022 Please 1 (52.97 KiB) Viewed 34 times
Visual Studios 2022 Please 2
Visual Studios 2022 Please 2 (15.11 KiB) Viewed 34 times
Understand the Application The enticement of selecting lucky numbers is a popular lure to gamers and gamblers alike. In this lab you will have an opportunity to exercise the inter-relationship of arrays and pointers to generate a dynamic collection of lucky numbers. To top it off there will be one GRAND lucky number! The Program Specification Write a program that dynamically allocates an array of integers. Obtain the number of integers from the user at runtime. Use that number to dynamically allocate an array that will hold the user supplied numbers. Calculate the sum of int values in the lucky array to generate a final GRAND lucky number. Your solution need include function definitions to satisfy the following prototypes: int getSize(): // function to validate user input for the size of the array to be dynamically created [1..8] int "arrayAllocator(int); function that dynamically allocates an array of integers. The function accepts an integer argument indicating the number of elements to allocate. The function should return a pointer to the array. int getValue(); // function to obtain a lucky number from the user [5..10] Testing Specification Provide 1 test run that demonstrates validation of user input as well as the generation of user-supplied lucky numbers at run time. Example Test Run Your program display should look something like this example run (although the values may differ for each student):
Example Test Run Your program display should look something like this example run (although the values may differ for each student): /Enter a value [1..8] @ Enter a value [1..8] 9 Enter a value [1..8] 2 Time to pick your 2 lucky numbers [5..10] Enter a lucky number [5..10]: 6 Enter a lucky number [5..10]: 7 Here are the values in the lucky array: Lucky number 1 has the value 6 Lucky number 2 has the value 7 Your GRAND lucky number is: 13 "/
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply