Positive integer number and gets input on same line

Assignment Help Basic Computer Science
Reference no: EM131055187

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: EM131055187

Questions Cloud

High level plan for handling contingencies : Write a 2-3 page (single spaced) high level plan for handling contingencies in a large bank with many branches in the united states. A detail plan will be much longer focus on only the high level plan and include those aspects that you think are r..
What is the implied value of the warrants attached to bond : Neubert Enterprises recently issued $1,000 par value 15-year bonds with a 6% coupon paid annually and warrants attached. These bonds are currently trading for $1,000. Neubert also has outstanding $1,000 par value 15-year straight debt with a 8% coupo..
Develope a fire prevention program that you will present : For this assignment, you will be developing a Fire Prevention Program that you will present via PowerPoint. You will draw ideas from both your occupational and educational experiences and knowledge.
What power would be expected to operate the prototype pump : what power would be expected to operate the prototype pump?
Positive integer number and gets input on same line : 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.
How familiar are you with charter schools : Please describe your experience working with children ages 5-17 Including children with disabilities.  How familiar are you with Charter Schools?
How much social security tax will be deducted : Rodney Whitaker earns $116,904 annually and is paid monthly. How much Social Security tax will be deducted from his December earnings? Social Security tax during this tax year is paid on the first $110,100 earned. How much Medicare tax will be deduct..
Determine the deflection of the spring. c = 80 kn/mm2 : A close coiled helical spring of round steel wire 10 mm diameter having 10 complete turns with a mean radius of 60 mm is subjected to an axial load of 200 N.
Calculate the exercise value of the firm warrants : Maese Industries Inc. has warrants outstanding that permit the holders to purchase 1 share of stock per warrant at a price of $27. Calculate the exercise value of the firm's warrants if the common sells at each of the following prices: What dollar co..

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  The model using one of the three approaches

Question ADescribe the model of "respect to persons" to common morality, explain its purpose in society, and then provide examples (from either your work experiences or from Internet search) of implementing the model using one of the three approaches..

  Write an iterative function power1 ,power2,power3

This problem considers several ways to compute xn for some n >= 0. (a) Write an iterative function power1 to compute xn for n >= 0.

  Installation options for customer tracking system

Which installation options are available for the Customer Tracking System? Which would you recommend? How can you determine if implementation has been successful?

  Prepare database design documents using the data definition

Prepare database design documents using the data definition, data manipulation, and data control language components of the SQL language.

  Pseudocode int an iterative one

Turn the following pseudocode int an iterative one, Assuming k is in T: if k is in T, Insert should change its associated item to x.

  Write a java method which takes an integer array parameter

Write a Java method which takes an integer array parameter and fills the array with random numbers between 1 and 1000, including 1 and 1000. Use a traditional for loop to process the array.

  Create cron file which will regularly perform backup

Create a cron file that will regularly perform the following back ups: performs a level 0 backup once per month and performs a level 2 dump one day per week

  Initial stage of software leading to its growth

My paper will focus of the initial stage of software leading to its growth and how it's used now. I also will focus on ideas of the direction Software Engineering will take technology. Technology grown rapidly from the day of the first compute..

  What information was relevant and why

Research at least two articles on the topic of big data and its business impacts. Write a brief synthesis and summary of the two articles. How are the topics of the two articles related? What information was relevant and why?

  Compare brands of virtualization software available

Compare and contrast the top three (3) brands of virtualization software available. Focus your efforts on components such as standard configuration, hardware requirements price, and associated costs.

  Write a java program that reads in a user-entered string

Write a Java program that reads in a user-entered string and determine whether it is a palindrome or not. Consider using the trim() function in the String class to get rid of all the empty spaces.

  A korean translated version of an excel file need editing

A Korean translated version of an excel file need editing and manipulation according to its specified command :  sheet 2: use SUMIF and COUNTIF command sheet 3: use IF and Rank command

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