Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry Challenge V1 #1

Open
Devabubakar opened this issue Feb 15, 2022 · 6 comments
Open

Entry Challenge V1 #1

Devabubakar opened this issue Feb 15, 2022 · 6 comments

Comments

@Devabubakar
Copy link
Collaborator

Entry Challenge V1

Create a function that takes two numbers as arguments and return their sum.

For example

  • Let create a function called addition
  • the function takes in two arguments
  • It returns the sum of the two arguments
addition(3, 2) ➞ 5

addition(-3, -6) ➞ -9

addition(7, 3) ➞ 10

@Devabubakar Devabubakar changed the title Entry Challenge V2 Entry Challenge V1 Feb 15, 2022
@LAURASOY1
Copy link

sum(10, -5)
returns 5

@Philip38-hub
Copy link

addition(int a, int b){
return a+b;
}

@Prawww
Copy link

Prawww commented Mar 5, 2022

function addition(a,b){
return a+b;
}

@Cal2b
Copy link

Cal2b commented Mar 7, 2022

sum(int a, int b){
return a+b;
}

@Phee254
Copy link

Phee254 commented Mar 16, 2022

Add ( num 1, num2)
const num1 = 5
const num2 = 1
const sum = num1 + num 2
console.log( 'The sum of' + num1 + 'and' + num2 + ' is: ' + sum)

@Bonam24
Copy link

Bonam24 commented Mar 20, 2022

using System;

namespace check1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter first number");
int n1 = int.Parse(Console.ReadLine());
Console.WriteLine("Enter second number");
int n2 = int.Parse(Console.ReadLine());

        add(ref n1, ref n2);
    }
    static void add(ref int n1, ref int n2)
    {
        
        int results = n1 + n2;
        Console.WriteLine("The result is " + results);
    }
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants