Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

=+CASE 2. Sr. By the second part of (7.30), A(r,s) =qA(2r-1,2s-1)0.

Answered: 1 week ago