1. Engineering
  2. Computer Science
  3. write a c program that does the following in main...

Question: write a c program that does the following in main...

Question details

Write a c++ program that does the following:

In main()

  1. Prompts the user to enter the height and length of a rectangle
  2. Calls a function that will double the the height and length entered

                             - arguments must be passed by address/pointer

                             - return type of the function should be void

  1. Calls another function that will calculate the area of the 'enlarged' rectangle

                             - arguments must be passed by value

  1. Display the new height, length and area of the rectangle

                             - ie. Height: 10   Length: 14 Area: 140

I am using Xcode please make sure the codes run through

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution