Write a program that generates this output: /* Output: Enter 5 numbers. Enter a number: 3 Enter a number: 4 Enter a number: 6 Enter a number: 9 Enter a number: 1 Here are the numbers in the array: 3 4...


Program in C++


Write a program that generates this output:<br>/* Output:<br>Enter 5 numbers.<br>Enter a number:<br>3<br>Enter a number:<br>4<br>Enter a number: 6<br>Enter a number: 9<br>Enter a number:<br>1<br>Here are the numbers in the array:<br>3<br>4<br>1.) In main(), declare an array named: numbers<br>size = 5<br>int data type<br>Initialize all array elements with zeros.<br>2.) In main(), call a function named: getNumbers()<br>A void function.<br>-<br>Pass the numbers array to the function.<br>In the function, asks the user to enter 5 numbers. (see output)<br>Read the numbers into the array.<br>-<br>3.) In main(), call a function named: showNumbers()<br>A void function.<br>Pass the numbers array to the function.<br>In the function, use a loop to display all numbers in the array. (see output)<br>

Extracted text: Write a program that generates this output: /* Output: Enter 5 numbers. Enter a number: 3 Enter a number: 4 Enter a number: 6 Enter a number: 9 Enter a number: 1 Here are the numbers in the array: 3 4 1.) In main(), declare an array named: numbers size = 5 int data type Initialize all array elements with zeros. 2.) In main(), call a function named: getNumbers() A void function. - Pass the numbers array to the function. In the function, asks the user to enter 5 numbers. (see output) Read the numbers into the array. - 3.) In main(), call a function named: showNumbers() A void function. Pass the numbers array to the function. In the function, use a loop to display all numbers in the array. (see output)

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here