Question: 6. Write a value return function SquareKm that takes two float parameters, length and width and return the value of the area in square kilometers.
6. Write a value return function SquareKm that takes two float parameters, length and width and return the value of the area in square kilometers. Assume length and width are siven in miles. The conversion factor from miles to kilometer is 1.6 7. Write a value returning string function called MonthAbbrey that takes an int variabile month as a parameter. The parameter, month, represents the number of the month. The function returns the name of the month. Say for example if month is 3, it returns March, if 11, returns November etc. Write a function that can take two inputs: x and y both floating point numbers and compute two outputs: r and theta both floating point variables. This function can be used to transform a rectangular coordinate into a polar coordinate. The transformation formulae are given as below: 8. theta= tan-1(y/x) From main, provide the inputs for x and y and check if x is not zero, then call this function to get the value of r and theta and display their values. Write a void function Reverselint n) which takes an integer number with 4 digits and reverses the number and displays in the reverse direction. Say for example if you entered 3210 it should display 0123 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
