Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

am i doing something wrong? the function doesnt work

using System;


namespace me

{

    class Program

    {

        


        static void Main(string[] args)

        {

        challenge();



        Console.ReadKey();

        }

    static void challenge(int num1, int num2)

    {

    Console.WriteLine("write a number");

    num1 = Convert.ToInt32(Console.ReadLine());


    Console.WriteLine("write a second number");

    num2 = Convert.ToInt32(Console.ReadLine());


    int result = num1 + num2;


    Console.WriteLine("the result is " + result);



    }

    

    

    }

}

Answers

  • Hey there, what doesn't work? Is it never called? Is some calculation going wrong?

  • oh so u also see it theres nothing wrong its just that the function doesnt "get called" ( i dont know how to say it) like i do the thing: function(); but nothing happens, either way my brother helped me solve it

Sign In or Register to comment.