Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
Question
Book Icon
Chapter 6, Problem 1E
Program Plan Intro

Program Plan

1. Below mentioned variables are used

  • intArrayinteger array that holds 10 integers as array elements.
  • inputinput value for array element read from the console.
  • position − position of array element given as input from the user to search for the element.
  • Pos −position value converted to int type.

Program description:

This program is for creating a console application that creates an array of ten elements and these elements are given as input through the console. It offers four options to the user that is to view the array elements in order and to view by the position of the element or to view in the reverse order. The fourth option is to quit the application.

Blurred answer
Students have asked these similar questions
Problem2 Write a program that display the position of a given element in an array. You should print the index (i.e. the position) of the element. If the element appears more than one time than you should print all its positions. The size of the array should be entered by the user. If the element does not occur then you should display element not found. Sample1: Enter the size of the array: 5 Enter an array of size 5: 44 5 13 44 67 Enter the element to find: 44 44 is found at position 44 is found at position 44 occurs 2 time(s) Sample2: Enter the size of the array: 4 Enter an array of size 4: 12 150 17 20 Enter the element: 18 18 is not found
The array size declarator must be an integer expression with a value greater than or equal to zero.     True     False
An array is a group of memory locations related by the fact that they all have the same name and but can be of different type. True or False
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
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