Statistics-homework-help
March 16, 2021
western-civilization-ancient-to-modern-history
March 16, 2021

Create-a-program-

Create a program that:

  1. Displays a menu of functions that the user is able to pick from. If information is returned from a function (ie NOT a void function), then that information should be displayed outside of the function. Any information passed as an argument (in the parenthesis) should be obtained outside of the function and passed in when called.
    1. void hello()
      1. Will simply display the text “Hello, world!”
    2. void printBetween(int a, int b)
      1. Will print all numbers between a and b, including a and b, counting up
        1. E.G. a = 3, b = 6, ouput = “3 4 5 6” (or can use newlines)
        2. Order is unassumed, but data is displayed counting up
    3. bool isPrime(int n)
      1. Returns true to indicate n is prime, or false to indicate it’s not
        1. A number n is prime if it is greater than 1 and not divisible by any of the numbers x in the range 1 < x < n
    4. int leastCommonDenominator(int a, int b)
      1. Returns the smallest number that is divisible by both a and b
        1. Which means (answer % a) and (answer % b) are both 0
        2. The least common denominator of 3 and 4 is 12
    5. void squaredOpposite(double &n)
      1. Sets the contents of the argument to be the squared value of n, with the opposite sign compared to n
        1. E.G. input of 3 would result in output of -9
        2. n is being passed as a reference variable, meaning changes made to it in the function will be reflected in the argument that was passed into the function call
  2. Asks the user if they would like to return to step 1, or exit.
 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.