Write an entire C program that reads a positive integer entered by a user and then prints out all the positive divisors of that integer in a column and in decreasing order. The program should allow the user to repeat this process as many times as the user likes. Initially, the program should inform the user about how the program will behave. Then the program should prompt the user for each integer that the user wishes to enter. The program may be terminated in any of two ways. One way is to have the program halt if the user enters an integer that's negative or zero. In this case, the user should be reminded with each prompt that the program can be terminated in that way. Alternatively, after an integer has been entered and the divisors have been printed, the program can ask the user whether he/she wishes to enter another integer. In this case, when the user accidentally enters a zero or negative integer to have its divisors calculated, the program should inform the user that the input is unacceptable and should allow the user to try again (and again!). Here is an illustration of how the program and the interactive user might interact. The user's responses to the program are shown in bold italics

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Write an entire C program that reads a positive integer entered by a user and then prints out all the positive divisors of
that integer in a column and in decreasing order. The program should allow the user to repeat this process as many
times as the user likes. Initially, the program should inform the user about how the program will behave. Then the
program should prompt the user for each integer that the user wishes to enter. The program may be terminated in any
of two ways.
One way is to have the program halt if the user enters an integer that's negative or zero. In this case, the user should be
reminded with each prompt that the program can be terminated in that way. Alternatively, after an integer has been
entered and the divisors have been printed, the program can ask the user whether he/she wishes to enter another
integer. In this case, when the user accidentally enters a zero or negative integer to have its divisors calculated, the
program should inform the user that the input is unacceptable and should allow the user to try again (and again!). Here
is an illustration of how the program and the interactive user might interact. The user's responses to the program are
shown in bold italics
Transcribed Image Text:Write an entire C program that reads a positive integer entered by a user and then prints out all the positive divisors of that integer in a column and in decreasing order. The program should allow the user to repeat this process as many times as the user likes. Initially, the program should inform the user about how the program will behave. Then the program should prompt the user for each integer that the user wishes to enter. The program may be terminated in any of two ways. One way is to have the program halt if the user enters an integer that's negative or zero. In this case, the user should be reminded with each prompt that the program can be terminated in that way. Alternatively, after an integer has been entered and the divisors have been printed, the program can ask the user whether he/she wishes to enter another integer. In this case, when the user accidentally enters a zero or negative integer to have its divisors calculated, the program should inform the user that the input is unacceptable and should allow the user to try again (and again!). Here is an illustration of how the program and the interactive user might interact. The user's responses to the program are shown in bold italics
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY