Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 8, Problem 1AW
Program Plan Intro
Array:
Array is a data structure that stores the sequence of similar type of data. It contains the sequence of data with common variable name and similar data type.
Syntax (in C++):
datatypearrayName[size] = {data1, data2,…,dataN};
Here,
datatype – Data type name
arrayName – Name of the array
size – It indicates the size of the array
- Declare a constant variable.
- Declare aString array with size “3”.
- Initialize the array with the names.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write a pseduocode declaration for a string array initlaized with the following strings "Einstein", "Newton", "Copernicus", and "Kepler". Please clearly declare all variables and constants if needed and provide comments.
use C++
Programming language is "C" : ( with comments please, The comments is very important):
(( 30 students were asked to rate the quality of the food in the students cafetariaon a scale of 1 to 10 ( 1 means awful and 10 means excellent)
Place the 30 responses in an integer array and summarize the results of the poll.
you should put the frequency for the program )).
Thank you
Chapter 8 Solutions
Starting Out with Programming Logic and Design (4th Edition)
Ch. 8.1 - Prob. 8.1CPCh. 8.1 - Prob. 8.2CPCh. 8.1 - Prob. 8.3CPCh. 8.1 - Prob. 8.4CPCh. 8.1 - Prob. 8.5CPCh. 8.1 - Prob. 8.6CPCh. 8.1 - Prob. 8.7CPCh. 8.1 - What does array bounds checking mean?Ch. 8.1 - Prob. 8.9CPCh. 8.2 - Prob. 8.10CP
Ch. 8.2 - Prob. 8.11CPCh. 8.2 - What does the loop do in the sequential search...Ch. 8.2 - Prob. 8.13CPCh. 8.2 - How do you look for a partial string match when...Ch. 8.3 - Prob. 8.15CPCh. 8.3 - Prob. 8.16CPCh. 8.3 - Describe the algorithm for finding the highest...Ch. 8.3 - Prob. 8.18CPCh. 8.3 - Prob. 8.19CPCh. 8.4 - Prob. 8.20CPCh. 8.4 - Prob. 8.21CPCh. 8.5 - Prob. 8.22CPCh. 8.5 - Write a pseudocode statement that assigns the...Ch. 8.5 - Prob. 8.24CPCh. 8.5 - Prob. 8.25CPCh. 8.6 - Prob. 8.26CPCh. 8 - Prob. 1MCCh. 8 - Prob. 2MCCh. 8 - This is an individual storage location in an...Ch. 8 - Prob. 4MCCh. 8 - Prob. 5MCCh. 8 - Prob. 6MCCh. 8 - Prob. 7MCCh. 8 - Prob. 8MCCh. 8 - Prob. 9MCCh. 8 - Prob. 10MCCh. 8 - Prob. 1TFCh. 8 - Prob. 2TFCh. 8 - Prob. 3TFCh. 8 - Prob. 4TFCh. 8 - Prob. 5TFCh. 8 - Prob. 1SACh. 8 - Prob. 2SACh. 8 - Look at the following pseudocode: Constant Integer...Ch. 8 - Prob. 4SACh. 8 - Prob. 5SACh. 8 - Prob. 1AWCh. 8 - Prob. 2AWCh. 8 - Prob. 3AWCh. 8 - Prob. 4AWCh. 8 - Prob. 5AWCh. 8 - Prob. 6AWCh. 8 - Assume the following declarations appear in a...Ch. 8 - Design an algorithm for a function that accepts an...Ch. 8 - Write a pseudocode algorithm that uses the For...Ch. 8 - Prob. 1DECh. 8 - Prob. 2DECh. 8 - Prob. 3DECh. 8 - Total Sales Design a program that asks the user to...Ch. 8 - Lottery Number Generator Design a program that...Ch. 8 - Prob. 3PECh. 8 - Prob. 4PECh. 8 - Charge Account Validation Design a program that...Ch. 8 - Days of Each Month Design a program that displays...Ch. 8 - Payroll Design a program that uses the following...Ch. 8 - Drives License Exam The local drivers license...Ch. 8 - Saddle Points Design a program that has a...Ch. 8 - Tic-Tac-Toe Game Design a program that allows two...Ch. 8 - Lo Shu Magic Square The Lo Shu Magic Square is a...
Knowledge Booster
Similar questions
- 2- Write a C# program that read a string and split this string according to space char into an array of strings using Substring, IndexOf (or LastIndexOf) The book on the Ex : strl ="The book on the table, the pen" -→ result= table the репarrow_forwardComputer Engineering labarrow_forwardProgramming language is "C" : ( write with comments please, The comments is very important): 30 students were asked to rate the quality of the food in the students cafeteriaon a scale of 1 to 10 ( 1 means awful and 10 means excellent) Place the 30 responses in an integer array and summarize the results of the poll. you should put the frequency for the program.1---52---93---110---20arrow_forward
- Selective Sum Code in C languagearrow_forwardPython Language: Word Sleuth Programarrow_forwardc++ programming Initialize a string array named person with your first, middle andlast name as separate elements. Print the middle name from the array. Iterate to print all values of the array. Output Example WilliamJohn William Henryarrow_forward
- Write a program that reads a sentence and store it in an array of characters. The program also reads a word and store in it a string variable. The program then conceals the word in the sentence with the character @'. Sample input / output: Enter a sentence: The town in which we live is a green town and big Enter a word: town Result: The @aa@ in which we live is a green @@@@ _and bigarrow_forwardCreate an array containing the information of 5 books. The information includes name, ISBN, printing time, price and type. (information of books should be already in the code and not entered by user) Output the information of the latest books, the information of the children's books, the information of IT books with the highest price. Requirement: Use C++ programming language Use OOP to define Book classarrow_forwardA palindrome is a word that is spelled the same way both forwards and backwards. For example, the word, 'racecar' is a palindrome. Using character arrays, write a c++ program that prompts the user to enter a word from the keyboard and informs the user whether the word is a palindrome or not.arrow_forward
- PYTHON CODE Write a PYTHON program that will take some string as an input and as well an array of integer that is the same length as the string. Following this, the string will be re-arranged such that the character at the nth position will move to the position n of the newly arranged string which is then returned to the user. For example: Example: Input string from user = “abc” and the array is [0, 1 , 2] Then the output is simply “abc”, each letter matches the correct position. Example: Input string from user = “aaiougrt” and the array is [4,0,2,6,7,3,1,5] Then the output will be “arigatou” Assume the user always enters a string and an array that are the same length, if there is a mismatch between the two lengths, simply continue to ask the user until they enter a string and array that are matching length.arrow_forwardWrite a C++ program that reads 6 real numbers from the user (negative and positivenumbers) into an array, then it does the following: Display all the values of array in reverse order. Find the sum and average of positive numbers of the array and display them. Count negative numbers of the array and display it. Find the minimum value of the array and display it. Find the index of the minimum value of the array and display it.arrow_forwardCODE USING C++ 3. Find the Culprit by CodeChum Admin "Help!!!" Someone's calling for help! It seems that someone was robbed and their phone was stolen. Luckily, the phone's GPS is turned on so we can track the culprit's coordinates! Instructions: Ask the user for the number of rows and columns of a 2D array and then its elements. Then, ask the user for another integer value which represents the culprit. Finally, go through the 2D array and find the culprit's coordinates - its row number and column number and display them. Input 1. Number of rows 2. Number of columns 3. Elements of the 2D array 4. Culprit's value Output Print the row of the position first and then the column of the position. Note that the row and the column is 0-based (i.e. it starts at 0 and not at 1). It is guaranteed that the culprit exists only once in the 2D array. Enter·#·of·rows:·4 Enter·#·of·columns:·4 Elements: 1·4·2·3 9·1·2·3 4·2·1·1 9·2·8·3 Enter·the·culprit's·value:·8…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning