Last active
February 25, 2022 13:31
-
-
Save shivam-gupta007/a6d7d46fd546c257533646af77c106d1 to your computer and use it in GitHub Desktop.
C# lab assignment Programs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class MyClass | |
{ | |
public static void Main(string[] args) | |
{ | |
int a=20, b=10; | |
Console.WriteLine ("Arithmetic operation"); | |
Console.WriteLine (a + " + " + b + " = " + (a+b)); | |
Console.WriteLine (a + " - " + b + " = " + (a-b)); | |
Console.WriteLine (a + " * " + b + " = " + (a*b)); | |
Console.WriteLine (a + " / " + b + " = " + (a/b)); | |
} | |
} | |
/* | |
OUTPUT- | |
Arithmetic operation | |
20 + 10 = 30 | |
20 - 10 = 10 | |
20 * 10 = 200 | |
20 / 10 = 2 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment