Menu

[Solved]Write Program Inputs 1×8 Vector Single Digit Integers Stores 8 Entry 32 Bit Integer Array Q37159744

Write a program that inputs a 1x8 vector of single-digit integers and stores it into an 8-entry 32-bit Integer array, V It is

Write a program that inputs a 1×8 vector of single-digit integers and stores it into an 8-entry 32-bit Integer array, V It is not completely trivial to do this given the Syscalls available and the desired input format. Hint: It is best to use Read String rather than Read Integer and then convert from ASCII to integer before storing into the integer array, V. You can use the ASCII table in the book to determine how to convert from ASCI to integer (there are two ways, both very easy) After storing the integers in the array, read in the same values using Read Integer and store them in a 32-bit integer array, VPrime. Subtract the two arrays integer by integer and put the results into a third 32-bit integer array, VCheck. Sum all the values in VCheck and print out the result. When you run the program, the input should look something like Input V: 1 4027384 (this is just an example vector, it can be any string of single digit integers) Input VPrime: 4 0 2 7 4 Where the integers 01234… 8 9 or whatever vector values the user wants to input are input by the user on the “console.) And the output will look like Check Result: 0 Show transcribed image text Write a program that inputs a 1×8 vector of single-digit integers and stores it into an 8-entry 32-bit Integer array, V It is not completely trivial to do this given the Syscalls available and the desired input format. Hint: It is best to use Read String rather than Read Integer and then convert from ASCII to integer before storing into the integer array, V. You can use the ASCII table in the book to determine how to convert from ASCI to integer (there are two ways, both very easy) After storing the integers in the array, read in the same values using Read Integer and store them in a 32-bit integer array, VPrime. Subtract the two arrays integer by integer and put the results into a third 32-bit integer array, VCheck. Sum all the values in VCheck and print out the result. When you run the program, the input should look something like Input V: 1 4027384 (this is just an example vector, it can be any string of single digit integers) Input VPrime: 4 0 2 7 4 Where the integers 01234… 8 9 or whatever vector values the user wants to input are input by the user on the “console.) And the output will look like Check Result: 0

Expert Answer


Answer to Write a program that inputs a 1×8 vector of single-digit integers and stores it into an 8-entry 32-bit Integer array, V … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *