Positive integer number from user and outputs

Assignment Help Basic Computer Science
Reference no: EM131056515

This is the exact prompt by the way. if you find anything else you might be able to help me with just send me a message. Thank you for the earlier response as well Direction.

Write a program that takes a positive integer number from user and outputs the number in the range from 1 to whatever user has entered with maximum sum of its divisors. The maximum sum of divisors should be outputted as well.

Please insert your name as a comment in the beginning of your code. Your should submit me your source code (.cpp file). Make sure your program works and does what it is supposed to be doing. The program that doesn't compile or doesn't output the correct result is 0 points. Remember that your programming style is also evaluated. Do not forget to test your program before submission! Remember, program that doesn't do what it is supposed to be doing worth 0 points.

Detailed description of the program is the following:

1. Your program outputs an invitation for user to enter positive integer number and gets the input on the same line.

2. If user inputs non-positive number then force user to reenter the number over and over again until user finally gets it right.

3. Check the whole range of numbers from 1 to whatever user has entered and find a number with the largest sum of its divisors. Output that number and the sum of its divisors on the screen in the following format: "Number 8 has a muximum sum of divisors 15" (where numbers 8 and 15 should, obviously, be replaced by the correct answers). A new line should be started after the output.

Reference no: EM131056515

Questions Cloud

Faciliate organization functionality : For each change indicate why such change is neccessary. How such changes faciliate organization functionality?
Write a program that displays the permissions from the acl : If the ACL entry that corresponds to the given user or group falls into the group class, then the program should additionally display the permissions that would apply after the ACL entry has been modified by the ACL mask entry
What words come to mind : What words come to mind? Select five-to-six words that relate to learning theories, implications of social and environmental factors on learning, interactions of development and learning, teaching strategies for accommodating diverse learners, and..
Exploring oop and its data structures : Writing Assignment: Exploring OOP & its Data Structures Complete and submit Research Problem. Write a five page paper using APA format for references. Object-oriented programming has been adopted widely because of its capability to reuse code.
Positive integer number from user and outputs : Write a program that takes a positive integer number from user and outputs the number in the range from 1 to whatever user has entered with maximum sum of its divisors. The maximum sum of divisors should be outputted as well.
Question regarding the tcp performance : Geoff Huston, "TCP Performance", The Internet Protocol Journal, Vol.3, No.2, June 2000.
Evaluating access control methods : Imagine you are an Information Systems Security Specialist for a medium-sized federal government contractor. The Chief Security Officer (CSO) is worried that the organization's current methods of access control are no longer sufficient.
Determine the test statistic and p-value : Define the parameter of interest. State the hypotheses and Determine the test statistic and p-value considering any necessary assumptions Decide whether to reject or not reject the null hypothesis
Whether there are multiple definitions of an environment var : Your version of unsetenv() should check to see whether there are multiple definitions of an environment variable, and remove them all (which is what the glibc version of unsetenv() does).

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Collaboration

Collaboration

  Wikis are web-based tools that make it easy

Wikis are Web-based tools that make it easy for users to add, remove, and change online content. Employees at companies such as Intel, Motorola, IBM, and Sony use them for a host of tasks, from setting internal meeting agendas to posting docume..

  What was view star''s probable strategic thinking here

What was View Star's probable strategic thinking here?

  Class automobile has a composite object

Assume that a definition of class Automobile has a composite object called my Engine. Also assuembers of class Engine me the all the data members of class Engine that contain information

  Probability of occurrence of four pairs in original sequce

What is the probability of occurrence of each of the four pairs in original sequence? Illustrate your work. What is the probability of occurrence of 0 and 1 in modified sequence?

  Give examples of 3 simple (scalar or primitive) data types

Give examples of 3 simple (scalar or primitive) data types commonly provided by programming languages, and identify the method used to represent each data type in the machine

  Let''s try to make inheritance

Let's try to make inheritance a little less abstract and a little bit more concrete. In order to do this, we will model a simple inheritance relationship

  List three objectives of a company''s internal control system

List three objectives of a company's internal control system

  What social engineering and physical security aspects

What sort of attacks would work in this case. Give some examples and how you would carry them out. What social engineering and physical security aspects were discovered/devised. Give a detailed explanation.

  Influence of culture on risks in offshore outsourcing

Read the journal article, titled, "Influence of Culture on Risks in Offshore Outsourcing of Software Projects: A Quantitative Study on Mum Effect".

  Why organizations important to continual learning

Why are professional organizations important to continual learning? What professional organizations benefit both the employee and the employer

  The following reflect passing scores in a class versus time

the following reflect passing scores in a class versus time spent weekly preparing for that coursepassc011011011011time

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd