Question
Write a simple program with functions that calculates the perimeter and area of a square. You will need two functions: Get an integer from the
Write a simple program with functions that calculates the perimeter and area of a square. You will need two functions: Get an integer from the user and return it to the main program (no validation required) Calculate the area and perimeter of the square and return both to the main program (the length of a side is passed in as a parameter) Main will call the first function and pass its value to the second function. It will then call the second function, save the results, and display them with using a cout statement. Your second function should not do any I/O. Just get a number from main, calculate the results, and return them.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started