C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Question
Book Icon
Chapter E, Problem E.9E
Program Plan Intro

Program Plan:

  • Include the required header files.
  • Declare function prototype which is used in the program.
  • Define the “main()” function.
    • Declare the variable n to assign number of elements.
    • Declare the int array named arr[n] with size n.
    • run a loop from 0 to n to take values from keyboard
    • Call the function PRINTARRAY() to print the values in the array.
  • Function PRINTARRAY(int arr[], int)
  • Function has two arguments one is array argument which receives the array passed by the calling function second is to receive the number of elements in the array.
    Runs a for loop from 0 to n (total number of elements).
    Prints the array elements.

Blurred answer
Students have asked these similar questions
In C Programming Write a main function that declares an array of 100 ints.  Fill the array with random values between 1 and 100. Calculate the average of the values in the array.  Output the average.
2. Write a general program that creates a table as seen below. Your program should calculate the grade average. You can only use integer or character multi-dimensional arrays to store or calculate data values. You are only allowed to use loops to calculate and print the table. All calculation and printing should be made in gradecalculator function. Data should be taken in the main function. Names Homework Midterm 1 Midterm 2 Final Grade 10% 20% 20% 50% average Ali 89 70 61 60 Ahmet 78 60 59 88 Ayse 99 70 77 66 Есе 100 68 55 72 Selen 80 55 30 82
Using c++ Compiler. Create a program that will store 5 integer numbers and store it on the array. Afterward, accept input for the integer number to be search on the array. Your program must display the index number where the integer number being search was found. If the integer number being search was not found on the array display NOT FOUND as message.
Knowledge Booster
Background pattern image
Computer Science
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
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
9.1: What is an Array? - Processing Tutorial; Author: The Coding Train;https://www.youtube.com/watch?v=NptnmWvkbTw;License: Standard Youtube License