C# C# Basics Methods Return Values

Blue DiamondXD
Blue DiamondXD
5,369 Points

Here's our version of the Multiply function from before. Update Multiply to return the multiplied value instead of print

IM TRIPPING

Program.cs
using System;

class Program
{

    static double Multiply(double firstParam, double secondParam)
    {
        return firstParam * secondParam;
    }

    static void Main(string[] args)
    {
        Multiply(2.5, 2) + Multiply(6, 7);
    }

}

3 Answers

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,167 Points

The instructions ask you to add the values together and print the result. You aren't printing the result.

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,167 Points

Use Console.WriteLine like in the original Multiply function

Blue DiamondXD
Blue DiamondXD
5,369 Points

and i just add it together??

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,167 Points

Yes. Console.WriteLine(Multiply(2.5, 2) + Multiply(6, 7));

Blue DiamondXD
Blue DiamondXD
5,369 Points

ohhhh i get it now thank you sooo much