C# C# Basics Methods Return Values

Blue DiamondXD
Blue DiamondXD
4,398 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
PRO
KRIS NIKOLAISEN
Pro Student 50,871 Points

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

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 50,871 Points

Use Console.WriteLine like in the original Multiply function

Blue DiamondXD
Blue DiamondXD
4,398 Points

and i just add it together??

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 50,871 Points

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

Blue DiamondXD
Blue DiamondXD
4,398 Points

ohhhh i get it now thank you sooo much