Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,33 @@ class Program
{
static void Main()
{
Console.WriteLine("Hello World!");
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");
var name = Console.ReadLine();
Console.WriteLine("Date now: " + DateTime.Now);
// Call the Function method Type here
ThirdStage();
}

static void FirstStage() {
string name = "Bob";
int value = 3;
float temperature = 34.4f;

Console.WriteLine($"Hello, {name}! You have {value} messages in your inbox. The temperature is {temperature} celsius.");
}

static void SecondStage() {
decimal value = 3.14159265359m;
double radius = 2.5323;

Console.WriteLine($"The value of Pi is approximately {value}.");
Console.WriteLine($"The radius of the circle is {radius}.");
}

static void ThirdStage() {
bool isStatus = false;
int age = 20;
if (age >= 18) {
isStatus = true;
}

Console.WriteLine($"Is the person {age} years old, an adult? {isStatus}");
}
}
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Project Base Learn .NET Console
Project console .NET basic from 0 to hero

## a. Store, Retrieve Data using Literal & Variable Value

```.cs
string name = "Bob";
int value = 3;
float temperature = 34.4f;

Console.WriteLine($"Hello, {name}! You have {value} messages in your inbox. The temperature is {temperature} celsius.");
```

![Screenshot 2025-02-11 at 23 54 13](https://github.com/user-attachments/assets/13be9a34-0abc-4e8e-b0e5-e3813e5557fb)


```.cs
decimal value = 3.14159265359m;
double radius = 2.5323;

Console.WriteLine($"The value of Pi is approximately {value}.");
Console.WriteLine($"The radius of the circle is {radius}.");
```

![Screenshot 2025-02-11 at 23 54 49](https://github.com/user-attachments/assets/db3b66de-2428-4e46-8229-911b6b5ff2a8)


```.cs
bool isStatus = false;
int age = 20;
if (age >= 18) {
isStatus = true;
}

Console.WriteLine($"Is the person {age} years old, an adult? {isStatus}");
```

![Screenshot 2025-02-11 at 23 55 12](https://github.com/user-attachments/assets/ea41a4f1-55f6-4133-b6b0-4f859ed74ba5)