4. The Big One by CodeChum Admin Remember that time when we've tried identifying the largest digit among the given integer? Well, let's take it to the next level, and figure out the same thing on arrays!   Let's do this one more time!   Instructions: Input a non-zero positive integer. Then create an integer array that has a size equal to the inputted integer. Using a loop, add integer values into the array one by one. The number of values to be stored is dependent on the inputted positive integer given in the first instruction. Print out the elements of the array in reverse order. Finally, print out the largest integer among all the elements on the array. Input 1. Size of the array 2. Elements of the array Output The first line will contain a message prompt to input the size of the array. The second line will prompt for the elements in the array. The third line will contain the elements of the array in reversed order. The last line contains the largest element. Enter·the·size:·5 5·34·3·23·10   Reversed·=·10·23·3·34·5 Largest·element·=·34   use; #include int main(void)  {

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question
100%

4. The Big One

by CodeChum Admin

Remember that time when we've tried identifying the largest digit among the given integer? Well, let's take it to the next level, and figure out the same thing on arrays!

 

Let's do this one more time!

 

Instructions:

  1. Input a non-zero positive integer. Then create an integer array that has a size equal to the inputted integer.
  2. Using a loop, add integer values into the array one by one. The number of values to be stored is dependent on the inputted positive integer given in the first instruction.
  3. Print out the elements of the array in reverse order.
  4. Finally, print out the largest integer among all the elements on the array.

Input

1. Size of the array

2. Elements of the array

Output

The first line will contain a message prompt to input the size of the array. The second line will prompt for the elements in the array. The third line will contain the elements of the array in reversed order. The last line contains the largest element.

Enter·the·size:·5
5·34·3·23·10
 
Reversed·=·10·23·3·34·5
Largest·element·=·34
 
use;
#include<stdio.h>
int main(void) 
{
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr