Even the smartest students need writing assistance at some point during their academic career. Should you lock yourself in a room and spend the entire weekend trying to write a paper? We promise you that the paper that you pay for won’t be resold or submitted elsewhere. It will also be written according to the instructions that you and your professor provide. Our excellent essays stand out among the rest for a reason. Don’t just take our word, check them out by yourself.

Order a Similar Paper Order a Different Paper


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, then that information should be displayed outside of the function. Any information passed as an argument should be obtained outside of the function.
    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)
    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 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 factor 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 the menu


1 – Documentation, readability, format

3.5 – Proper use of functions

2.5 – Proper program flow (conditionals, loops, etc)

2 – Filename and Header

1 – Output testing


//Author: (your name)

//CPSC 120 Lab 5

//<MM/DD/YY> (Current Date)


<Last Name><First Initial>lab5.cpp, e.x. my assignment would be named MayElab5.cpp


Do you need help with this or a different assignment? In a world where academic success does not come without efforts, we do our best to provide the most proficient and capable essay writing service. After all, impressing professors shouldn’t be hard, we make that possible. If you decide to make your order on our website, you will get 15 % off your first order. You only need to indicate the discount code GET15.

Order a Similar Paper Order a Different Paper