Question: help please! C++. You only need to write the functions listed above. (Although you can also write helper functions if they are useful.) You should

help please! C++.

You only need to write the functions listed above. (Although you can also write helper functions if they are useful.) You should not change anything in the main function. The parts where you need to write code are indicated by the comments I gave you. When you are finished the main function should be in exactly the same form as before you started. For the area function, you should use an assert statement to make sure both sides are >= 0 (zero is fine). Dont forget to include cassert. For all other problems, you can assume the user enters valid input. Make sure to write comments for all of your functions. Use the format shown in class of:

/** short description @param @return */ 

help please! C++. You only need to write the functions listed above.HERE IS THE CODE TO BE USED

(Although you can also write helper functions if they are useful.) You

Problem 2: The format of this problem is a bit different. Your job is to write three functions 1. area: this function should input two numbers x and y and return the area of a rectangle with side lengths x and y. 2. longest: this function should input two words and return the longer word. If its a tie, it should return the first word. 3. shortest: this function should input two words and return the shorter word. If its a tie, it should return the second word. 1 #include 2 using namespace std; 3 4 / /*** 5 Add comments in the proper format here 6 */ 7 double area(double x, double y) { 8 //your code goes here 9 10 return 0; //change this to make it work correctly 11 } 12 13 14 15 Add comments in the proper format here 16 */ 17 string longest(string s1, string s2) { 18 //your code goes here 19 20 return !!! ";//change this 21 } 22 23 24 /** 25 Add comments in the proper format here 26 */ 27 string shortest(string s1, string s2) { 28 //your code goes here 29 30 return ""; //change this 31 } 32 33 34 int main() { 35 36 double x = 3; 37 double y = 4; 38 string s1 = "abcd"; 39 string s2 = "abcde"; 40 41 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!