WRITING FUNCTIONS THAT REQUIRE MULTIPLE
WRITING FUNCTIONS THAT REQUIRE MULTIPLE PARAMETERS In this exercise, you use what you have learned about writing C++ functions that require multiple parameters.
Â
1. Given the following function calls and variable declarations, write the function’s header and function declaration:
a. string name, date; printBirthdayInvitation(name, date);
b. double one_length, two_length; calculateRectangleArea(one_length, two_length);
c. int day, month, year; printNotice(day, month, year);
2. Given the following function headers and variable declarations, write a function call:
a. string custName = "Smith"; double balance = 54000; void custInfo(string name, double bal)
b. int val1 = 10, val2 = 20; void printSum(int num1, int num2)
c. double salary = 37500, percent = .10; void increase(double sal, double pcnt)
Answers
Status NEW
Posted 02 May 2017 11:05 AM
My Price 7.00
-----------
Attachments
file 1493725457-answer1.docx preview (136 words )
W-----------RIT-----------ING----------- FU-----------NCT-----------ION-----------S T-----------HAT----------- RE-----------QUI-----------RE -----------MUL-----------TIP-----------LE -----------PAR-----------AME-----------TER-----------S I-----------n t-----------his----------- ex-----------erc-----------ise-----------, y-----------ou -----------use----------- wh-----------at -----------you----------- ha-----------ve -----------lea-----------rne-----------d a-----------bou-----------t w-----------rit-----------ing----------- C+-----------+ f-----------unc-----------tio-----------ns -----------tha-----------t r-----------equ-----------ire----------- mu-----------lti-----------ple----------- pa-----------ram-----------ete-----------rs.----------- 1-----------. G-----------ive-----------n t-----------he -----------fol-----------low-----------ing----------- fu-----------nct-----------ion----------- ca-----------lls----------- an-----------d v-----------ari-----------abl-----------e d-----------ecl-----------ara-----------tio-----------ns,----------- wr-----------ite----------- th-----------e f-----------unc-----------tio-----------nâ€-----------™s -----------hea-----------der----------- an-----------d f-----------unc-----------tio-----------n d-----------ecl-----------ara-----------tio-----------n: ----------- a.----------- st-----------rin-----------g n-----------ame-----------, d-----------ate-----------; p-----------rin-----------tBi-----------rth-----------day-----------Inv-----------ita-----------tio-----------n(n-----------ame-----------, d-----------ate-----------); ----------- b.----------- do-----------ubl-----------e o-----------ne_-----------len-----------gth-----------, t-----------wo_-----------len-----------gth-----------; c-----------alc-----------ula-----------teR-----------ect-----------ang-----------leA-----------rea-----------(on-----------e_l-----------eng-----------th,----------- tw-----------o_l-----------eng-----------th)-----------; -----------c.
Not Rated(0)