Question: Create an array of size 10. Take inputs from the user and populate the array. The inputs will be numerical values ranging from [1-9]. Now,

Create an array of size 10. Take inputs from the user and populate the array. The inputs will be numerical values ranging from [1-9]. Now, you are to find all the pairs of numbers whose sum is equal to 10.

If there are no such pairs then print SORRY! No Such Pairs

Remember that a number can be used to form multiple pairs

Sample Input 01:

1 2 3 4 5 6 7 8 9 1

Sample Output 01:

19

28

37

46

Sample Input 02:

1 2 3 4 5 1 2 3 4 1

Sample Output 02:

SORRY! No Such Pairs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!