Information Technology > SOLUTIONS MANUAL > Northern Virginia Community College - ITP 100Chapter 8 Homework (All)
Chapter 8 Homework Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized with the following strings: “Einstein”, “Newton”, “Copernicus”, and � ... ��Kepler”. Constant Integer SIZE = 4 Declare Real astronomers[SIZE] = “Einstein”, “Newton”, “Copernicus”, “Kepler” 2. Assume names in an Integer array with 20 elements. Write a pseudocode algorithm a For Loop that displays each element of the array. Constant Integer SIZE = 20 Declare String names[SIZE] For i = 0 to i = SIZE-1 Display names[i] End For 3. Assume the arrays numberArray1 and numberArray2 each have 100 elements. Write a pseudocode algorithm that copies the values in numberArray1 to numberArray2. Constant Integer SIZE = 100 For i = 0 to i = SIZE-1 Set numberArray2[i] = numberArray1[i] End For 4. Write a pseudocode algorithm for a function that accepts an Integer array as an argument and returns the total of the values in the array. Function Real calculateTotal (Integer array[], Integer arraySize) Declare Integer i Declare Integer total total = 0 For i = 0 to i = arraySize-1 Set total = total + array[i] End For Return total End Function [Show More]
Last updated: 2 years ago
Preview 1 out of 3 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Apr 08, 2021
Number of pages
3
Written in
All
This document has been written for:
Uploaded
Apr 08, 2021
Downloads
0
Views
156
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·