Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CSCI 1320 c programming 3) Write an algorithm to take a list of numbers from user and determine the numbers divisible by the number 7.
CSCI 1320 c programming
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 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 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