3) Write an algorithm to take a list of numbers from user and determine the numbers divisible by the number 7. You need to first prompt the user that how many numbers s/he wants to input and then take the numbers. After taking the numbers, you check which numbers are divisible by 7 from the list. You need to print the number along with the position of the number. Finally, you need to print how many numbers from the list is divisible by 7. If there is no number divisible by 7 then print the message "Sorry, the list doesn’t contain any number divisible by 7".
Input: How many numbers to input? 5 22 21 15 78 49
Output:
Number: 21
Position: 2
Number: 49
Position: 5
Numbers divisible by 7 is: 2
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
Kindly revert for any queries
Thanks.
Get Answers For Free
Most questions answered within 1 hours.