Paper Writing Services and printout whether it is prime or not. Example of prompts and output Please enter an integer and I will tell you

Abstract
an integer as a parameter and returns a boolean that indicates whether the number is prime or not. Allow the user to enter a number between 2 and 10000 and printout whether it is prime or not. Example of prompts and output Please enter an integer and I will tell you if it is prime: 19 Would you

Program #4 Write a program that includes two functions. The First (named isPerfect) receives no parameters and does not return any parameters. It simply calculates and prints all the perfect numbers between 1 and 10000. A perfect number is a number whose sum of its divisors (not including the number itself) add up to the number Determine through processing and print each perfect number and its divisors from 1 to 10000 (there are only 4). Pause the screen and clear the screen between outputs. The output for each perfect number should be like the following example. The second function (named isPrime) that receives an integer as a parameter and returns a boolean that indicates whether the number is prime or not. Allow the user to enter a number between 2 and 10000 and printout whether it is prime or not. Example of prompts and output Please enter an integer and I will tell you if it is prime: 19 Would you like to do another (y/n)? y …clear screen Please enter an integer and I will tell you if it is prime: 21 Would you like to do another (y/n)? n …end the program Clear the screen between runs. Do not rerun the perfect code, just the prime. Make sure you use function prototypes and no globals. Make sure your output is like the above. Check for invalid input for the prime. If an invalid number is entered, display an error message and then go to the prompt that asks whether he wants to do another. Name the program numbers.cpp

Sample references
  • (‘Jenkins, A., and D. Holland. 2007. Melting of floating ice and sea level rise. Geophysical Research Letters 34(16).’,)
  • (‘Grantham, B. A., F. Chan, K. J. Nielsen, D. S. Fox, J. A. Barth, A. Huyer, J. Lubchenco, and B. A. Menge. 2004. Upwelling-driven nearshore hypoxia signals ecosystem and oceanographic changes in the northeast Pacific. Nature 429 (6993):749-754.’,)
  • (‘Elliott, D. L., L. L. Wendell, and G. L. Gower. 1991. An Assessment of the Available Windy Land Area and Wind Energy Potential in the Contiguous United States. Report PNL-7789. Richland, WA: Pacific Northwest Laboratory.’,)
  • (‘Grove, J. M. 2009. Cities: Managing densely settled biological systems. In Principles of Ecosystem Stewardship: Resilience-Based Natural Resource Management in a Changing World, F. S. Chapin III, G. P. Kofinas, and C. Folke, eds. New York: Springer.’,)

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer