Skip to content

Instantly share code, notes, and snippets.

@shivam-gupta007
Last active February 25, 2022 13:31
Show Gist options
  • Save shivam-gupta007/a6d7d46fd546c257533646af77c106d1 to your computer and use it in GitHub Desktop.
Save shivam-gupta007/a6d7d46fd546c257533646af77c106d1 to your computer and use it in GitHub Desktop.
C# lab assignment Programs
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