Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am using c language and dev c compiler. 1. Write a program which will take 10 integers between 1 and 20, as input from
I am using c language and dev c compiler.
1. Write a program which will take 10 integers between 1 and 20, as input from the user, store them in an array named as userInputs. In your program, define an array named as referenceNumbers with numbers given below. For each corresponding elements in both arrays with same index, calculate maximum absolute difference between corresponding elements. Numbers for referenceNumbers array: {7, 1, 9, 3, 4, 15, 11, 2, 19, 12} 4 19 9 10 12 10 2 6 4 Examples: If user inputs 1, 4, 2, 8, 17, 4, 11, 5, 9, 10 numbers, differences will be; Reference Array 7 1934 | 15 | 11 2 User Array 1 4 2 8 17 115 Absolute Difference 63 7 5 13 0 3 Maximum Absolute Difference 13 (with sh elements) Example output: Welcome. Please input 10 integers between 1 and 20. 1. number: 6 2. number: 4 3. number: 5 3 4. number: 3 2 5. number: 2 1 6. number: 1 2 7. number: 2 3 8. number: 3 4 9. number: 4 5 10. number: 5 Maximum difference is 15 for 9. elements. 5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started