0

This is about the arrays...I thought a lot...but I couldn't get any ideas from that...please help me.. thanks!!

the question:
A series of numbers can be read from the keyboard and put into an array of integers. You will then need to call a function to invert the values (1/x) and put the inverted valued into a new array of doubles.

Write the pseudocode (algorithm) for the following program definition: Write a program to read an integer count (between 1 and 10) and then read count integer values to put into the array. For each value, call the inveritng function and put the inverting value into the second array of doubles. Finally print out a report in two lines and count +1 columns to display the original and the inverted values and the largest value of each array in squared brackets.

You must use arrays and you must use a function in this program.

Typical result:
Original values: 4 5 100 [100]
Inverted values: 0.25 0.20 0.01 [0.25]

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Aia
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.