Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

12:017 Search CMSC 202 - Lab 02-... need to complete your prelab quiz on Blackboard under Assignments then Labs. You have until Monday at 10am

image text in transcribed
12:017 Search CMSC 202 - Lab 02-... need to complete your prelab quiz on Blackboard under "Assignments" then "Labs". You have until Monday at 10am to complete your prelab quiz. 10. Programming Assignment You will practice working with input o utcoitallic loops, and functions by adding code to the lab2.cpp plate provided. More specifically, you will need to add the function prototype and body for 2 functions, invoking them in main() as detailed below: Implement the function sunInts(). The function should accepting as a parameter indicating the number of integers that the user should ni The user should be able to enter the sumber of inters specified by the passed argument. The function should then put the sum of such numbers and return the w as an inter Implement the function isEven(). The function should accept an integer as a parameter If the passed argument is even the function should display "even", otherwise, it should displayed The function should not return anything Add a function call to sumInts() and isEven() in main() The user should enter numbers, and the program should display the sum of much numbers, as well as if the sum is een lodd This logic must be implemented in one line You can download you starting file from: /afs/umbc.edu/users/5/d/5dixos/pb/cs202/lab If you've SSH'd into the GL servers, issue the following command at the command prompt while you're in your lab2 directory: Note: the at the end of the command is very important /ats/umbc.edu/users//d/jdixon/pub/cs202/lab 2/lab2.CPP . Here is an example compilation and execution of the programe i l land 10.1. Compiling and Running To compile your program, runcither of the following commands at the Linux proept: g++ -Wall lab2.cpp - lab2 or make lab 2 This command run the GNU C compiler . The Wall instructs the compilar to be verbose in production of warning messages, the option -o lab2 (hyphen followed by the letter "o" not the digitro), instructs the compiler to give the executable program the name lab2. If the program compiles corectly, the executable file lab2 will be created in the current directory At the Linux prompt, enter the command ./lab2 or you program It sho de above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions