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

  Force p that will cause impending motion

The coefficient of static friction between the crate and the ground is µs = 0.2, and between the wheel and the ground µ's = 0.5.

  Review the content page for this extensive manual

Visit the U.S Postal Service web site at www.usps.com/cpim.ftp/hand/as805/. Review the content page for this extensive manual. Compare this program to the National Institute for Standards and Technology documements (NIST).Which areas are similiar to ..

  Computer peripheral devices

Identify and explain key trends that are occurring in computer peripheral devices? How do these trends affect business uses of computers?Discuss important computer hardware developments that you expect to happen in the next 10 years? How will thes..

  The importance of operational definitions

How might the use of one or the other lead to different conclusions from experimental results regarding who helps more, males or females? What does this tell you about the importance of operational definitions?

  Design a program using java code to process round trip

Design a program using JAVA code to process round trip tickets for travel to 2 cities and determine the bill for the travel tickets. The return trip must be at least 7 days from the initial trip to qualify for a discount of 20%, otherwise trave..

  Possibility-using fiber optic cable instead of twisted pair

Discuss the possibility of using fiber optic cable instead of either twisted pair cable or staying with the existing coax wiring structure.

  Write code that merges two sorted arrays

Write a code that merges two sorted arrays so that the result is a sorted array. In your code, declare an array called ‘A1’ of size 5 and an array ‘A2’ of size 5. Fill them with numbers that are in ascending order.

  Web about toutorial for cooking saudi food

Will develop a web about toutorial for cooking Saudi food , and have a hard time writing a planing project for my topic. Follow these link in order to complete the assignment Her is the requirements for the assignment This assignment has two part..

  Explain the roles of computer forensics expert

Explain the roles of computer forensics expert and computer security expert. You should include the following: Which specific positions (job titles) are in demand within business organizations?

  The lebanese case

During the last civil war (1975-1990), eighty percent of the Lebanese infrastructure was destroyed. The remaining twenty percent are now outdated. The Lebanese banking sector was heavily affected by the war. They lacked the information technology rev..

  Hardware requirements for implementing windows server

You were hired as a consultant to analyze an existing Windows Server environment in a utilizing Windows Server 2003 and 2008.

  Explaining how you benefit from your use of the internet

Compose a paragraph explaining how you benefit from your use of the Internet. Make sure it is practical and related to work, school or personal life.

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