CS
cs
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
using System;
namespace Sololearn
{
class Program
{
static void Main(string[] args)
{
int n1=0, n2=0;
//get input, conert to int
Console.WriteLine("Enter two values");
int.TryParse(Console.ReadLine(), out n1);
int.TryParse(Console.ReadLine(), out n2);
//display input values
Console.WriteLine(
$"n1 = {n1} n2 = {n2}\n");
//handle division, division by zero
double? res = 0.0;
if(n2!=0) res = Math.Round((double)n1/n2,2);
else res = null;
//print multiline interpolated string
Console.WriteLine($@"Sum total = {n1+ n2}
Diff total = {n1-n2}
Prod total = {n1*n2}
Quot total = {
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run