Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vangj committed Apr 20, 2023
1 parent 2b3731d commit 73eb83f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 33 deletions.
43 changes: 24 additions & 19 deletions app/Program.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
Console.WriteLine("youssef is awesome!");
internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
Console.WriteLine("youssef is awesome!");

// variables
short aShort = 1;
byte aByte = 8;
int a = 22;
string s = "youssef";
float w = 155.5f;
double d = 188.8d;
bool b = false;
// variables
short aShort = 1;
byte aByte = 8;
int a = 22;
string s = "youssef";
float w = 155.5f;
double d = 188.8d;
bool b = false;

Console.WriteLine($"a={a}, s={s}, w={w}, b={b}, d={d}, aShort={aShort}, aByte={aByte}");
Console.WriteLine($"a={a}, s={s}, w={w}, b={b}, d={d}, aShort={aShort}, aByte={aByte}");

// declaration
int x;
int y;
// declaration
int x;
int y;

// assignment
x = 22;
y = 33;
// assignment
x = 22;
y = 33;

Console.WriteLine($"x={x}, y={y}");
Console.WriteLine($"x={x}, y={y}");
}
}
34 changes: 20 additions & 14 deletions app1/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
int a = 10;
int b = 11;
int c = a + b;
int d = a - b;
int e = a * b;
int f = a / b;
double g = a / (double)b;
int h = a % b;
internal class Program
{
private static void Main(string[] args)
{
int a = 10;
int b = 11;
int c = a + b;
int d = a - b;
int e = a * b;
int f = a / b;
double g = a / (double)b;
int h = a % b;


Console.WriteLine($"{a} + {b} = {c}");
Console.WriteLine($"{a} - {b} = {d}");
Console.WriteLine($"{a} * {b} = {e}");
Console.WriteLine($"{a} / {b} = {f}");
Console.WriteLine($"{a} / {b} = {g}");
Console.WriteLine($"{a} % {b} = {h}");
Console.WriteLine($"{a} + {b} = {c}");
Console.WriteLine($"{a} - {b} = {d}");
Console.WriteLine($"{a} * {b} = {e}");
Console.WriteLine($"{a} / {b} = {f}");
Console.WriteLine($"{a} / {b} = {g}");
Console.WriteLine($"{a} % {b} = {h}");
}
}

0 comments on commit 73eb83f

Please sign in to comment.