GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

If you forgot to download the main.cpp starter file before y…

If you forgot to download the main.cpp starter file before you start the exam, you will need to open the starter main.cpp file and type it in by hand. You must use an IDE on your computer (Code::Blocks, VS, Xcode, etc.) You may not use an online IDE, such as Replit. Upload your .cpp final exam here. Do not upload a zip folder, only the .cpp file. NO INTERNET ALLOWED. Open the IDE on your computer and import main.cpp. You have 60 minutes to complete the exam. Upload your .cpp file to Canvas when you are done. Requirements: Complete the functions maxEven(), swap(), and printArray(). Do not add any additional code to main(). maxEven() – this function prompts the user for 5 integers and returns the maximum even integer that was entered. If no even integers were entered, the function will return -1 swap() –  this function is passed an array and the number of elements. The function will loop through the array and if any pair of elements add to 5, the first and last elements in the array are swapped. In this problem a pair is two consecutive elements that are next to each other, for example, in the arrays: [1, 2, 3, 4, 2, 7], there is one pair of elements that add to 5, so after the function call, the array will contain [7, 2, 3, 4, 2, 1] [1, 2, 4, 3, 7], no pairs of elements add to 5, so the function does not swap the first and last elements printArray() – this function prints the contents of the array, please print each element on the same line, separated by a space. Print a newline Grading Rubric: Program compiles and output is produced. +1 Style guidelines followed, indentation, spacing, etc. (you do not need a program comment header, or use input validation) +1 maxEven() function: uses a loop to prompt for integers +1 correctly determines if an integer is even +1 returns the max even entered +1 returns -1 if no evens were entered +1 swap() function: correctly swaps first and last elements +1 loops through the entire array, no bounds errors +1 correctly determines if consecutive elements add to 5 +1 printArray() function: prints every element in the array +1

Read Details

What is the target of daptomycin and polymyxin?  How do they…

What is the target of daptomycin and polymyxin?  How do they function?  What are their spectra of action (broad, narrow, etc.)?  Explain the reason for their spectra.

Read Details

What is the emitter current IE?

What is the emitter current IE?

Read Details

What is the transconductance  in small signal model?

What is the transconductance  in small signal model?

Read Details

What is the base-emitter voltage, VBE?

What is the base-emitter voltage, VBE?

Read Details

What is the base voltage VB?

What is the base voltage VB?

Read Details

Why are prices downward inflexible?

Why are prices downward inflexible?

Read Details

Where does the right atrium pump blood?

Where does the right atrium pump blood?

Read Details

CHOOSE ALL THAT APPLY: Which of these structures would illic…

CHOOSE ALL THAT APPLY: Which of these structures would illicit an immune response?

Read Details

During the cell depolarization model, what happens when K+ c…

During the cell depolarization model, what happens when K+ channels open?

Read Details

Posts pagination

Newer posts 1 … 30,452 30,453 30,454 30,455 30,456 … 69,375 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top