Answer to Question #129837 in C++ for Adeel Haider

Question #129837
Write a C++ program that creates two one dimensional arrays “A” and “B” of size 10 elements each. The main program should get the input in the array “A” from the user and initialize array “B” with values “0”. Your program should calculate the square (number * number) of each element of array “A” and should store in the square value in corresponding positions (index) in the array “B”. In the end, the main program (main function) prints the calculated values of array “B”. Also display the values in array B which are divisible by 3 (if any).

Sample Inputs:
Please enter values in array A:
2 8 3 4 10 5 9 3 2 1

Sample Outputs:
The values in Array B are:
4 64 9 16 100 25 81 9 4 1

Values in Array B which are divisible by 3:
1
Expert's answer
2020-08-17T07:35:30-0400
Dear Adeel Haider, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS