Question: In C# Create a program called Krakenator that will be used to compute a kraken's weight in tons based on its length in meters. Your

In C#

Create a program called Krakenator that will be used to compute a kraken's weight in tons based on its length in meters. Your program must use a method to do this and you must write this method. Your method must be called MetersToTons and the method must accept a parameter called meters (type double). The method should then use the formula shown below to calculate the kraken's weight, then RETURN (not output) that value.

weight in tons = meters * 3.87

So, a 20-meter kraken would weigh 77.4 tons (20 * 3.87 = 77.4)

Summary of logic:

Have your Main() method prompt the user for a kraken length, then PASS that value (as a parameter) to your MetersToTons method, then output the value RETURNED by your MetersToTons method (note that it is Main that outputs the returned value -- MetersToTons should not output anything).

Be sure to use a named constant for the constant above.

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!