Skip to content

Commit 8a4d311

Browse files
committed
edit
1 parent 466ffed commit 8a4d311

File tree

19 files changed

+117
-150
lines changed

19 files changed

+117
-150
lines changed

01.CSharp Intro and Basic Syntax/CSharp Intro and Basic Syntax

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
3+
public class DebitCardNumber
4+
{
5+
public static void Main()
6+
{
7+
int firstCard = int.Parse(Console.ReadLine());
8+
int secondCard = int.Parse(Console.ReadLine());
9+
int thirdCard = int.Parse(Console.ReadLine());
10+
int fourthCard = int.Parse(Console.ReadLine());
11+
12+
Console.WriteLine($"{firstCard:D4} {secondCard:D4} {thirdCard:D4} {fourthCard:D4}");
13+
}
14+
}

01.CSharp Intro and Basic Syntax/Exercises/01.DebitCardNumber/Program.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

01.CSharp Intro and Basic Syntax/Exercises/02.RectangleArea/Program.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
3+
public class RectangleArea
4+
{
5+
public static void Main()
6+
{
7+
double a = double.Parse(Console.ReadLine());
8+
double b = double.Parse(Console.ReadLine());
9+
10+
double sum = a * b;
11+
12+
Console.WriteLine($"{sum:f2}");
13+
}
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
3+
public class MilesToKm
4+
{
5+
public static void Main()
6+
{
7+
double miles = double.Parse(Console.ReadLine());
8+
double milesToKm = miles * 1.60934;
9+
10+
Console.WriteLine($"{milesToKm:f2}");
11+
}
12+
}

01.CSharp Intro and Basic Syntax/Exercises/03.MilesToKm/Program.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
3+
public class BeverageLabels
4+
{
5+
public static void Main()
6+
{
7+
string name = Console.ReadLine();
8+
int volume = int.Parse(Console.ReadLine());
9+
int energy = int.Parse(Console.ReadLine());
10+
double sugarContent = double.Parse(Console.ReadLine());
11+
12+
double kcal = (volume * energy) / 100.0;
13+
double sugar = (volume * sugarContent) / 100;
14+
15+
Console.WriteLine($"{volume}ml {name}:");
16+
Console.WriteLine($"{kcal}kcal, {sugar}g sugars");
17+
}
18+
}

01.CSharp Intro and Basic Syntax/Exercises/04.BeverageLabels/Program.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
3+
public class CharacterStats
4+
{
5+
public static void Main()
6+
{
7+
string name = Console.ReadLine();
8+
int currentHealth = int.Parse(Console.ReadLine());
9+
int maxHealth = int.Parse(Console.ReadLine());
10+
int currentEnergy = int.Parse(Console.ReadLine());
11+
int maxEnergy = int.Parse(Console.ReadLine());
12+
13+
Console.WriteLine($"Name: {name}");
14+
Console.WriteLine("Health: |" + new string('|', currentHealth) + new string('.', maxHealth - currentHealth) + "|");
15+
Console.WriteLine($"Energy: |{new string('|', currentEnergy)}{new string('.', maxEnergy - currentEnergy)}|");
16+
}
17+
}

01.CSharp Intro and Basic Syntax/Exercises/05.CharacterStats/Program.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

01.CSharp Intro and Basic Syntax/Exercises/Exercises

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using System;
2+
3+
public class Greeting
4+
{
5+
public static void Main()
6+
{
7+
string name = Console.ReadLine();
8+
9+
Console.WriteLine($"Hello, {name}!");
10+
}
11+
}

01.CSharp Intro and Basic Syntax/LAB/01.Greeting/Program.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
3+
public class AddTwoNumbers
4+
{
5+
public static void Main()
6+
{
7+
int a = int.Parse(Console.ReadLine());
8+
int b = int.Parse(Console.ReadLine());
9+
10+
int sum = a + b;
11+
12+
Console.WriteLine($"{a} + {b} = {sum}");
13+
}
14+
}

01.CSharp Intro and Basic Syntax/LAB/02.AddTwoNumbers/Program.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
3+
public class EmployeeData
4+
{
5+
public static void Main()
6+
{
7+
string name = Console.ReadLine();
8+
int age = int.Parse(Console.ReadLine());
9+
int id = int.Parse(Console.ReadLine());
10+
double salary = double.Parse(Console.ReadLine());
11+
12+
Console.WriteLine($"Name: {name}");
13+
Console.WriteLine($"Age: {age}");
14+
Console.WriteLine("Employee ID: {0:d8}", id);
15+
Console.WriteLine("Salary: {0:f2}", salary);
16+
}
17+
}

01.CSharp Intro and Basic Syntax/LAB/03.EmployeeData/Program.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

01.CSharp Intro and Basic Syntax/LAB/LAB

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)