-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
33 lines (31 loc) · 822 Bytes
/
Program.cs
File metadata and controls
33 lines (31 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
namespace Arithmetic_Functions
{
class Program
{
static int sum(int a, int b)
{
return a + b;
}
static int sub(int a, int b)
{
return a - b;
}
static int star(int a, int b)
{
return a * b;
}
static int div(int a, int b)
{
return a / b;
}
static void Main(string[] args)
{
Console.Write("Enter First Intger: ");
int a = Convert.ToInt32(Console.ReadLine());
Console.Write("Enter Second Intger: ");
int b = Convert.ToInt32(Console.ReadLine());
Console.WriteLine($"Sum = {sum(a,b)} | Difference = {sub(a,b)} | Product = {star(a,b)} | Division = {div(a,b) }");
}
}
}