-
Notifications
You must be signed in to change notification settings - Fork 519
Expand file tree
/
Copy pathProgram.cs
More file actions
29 lines (26 loc) · 862 Bytes
/
Program.cs
File metadata and controls
29 lines (26 loc) · 862 Bytes
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
29
namespace VariablesExercise
{
public class Program
{
static void Main(string[] args)
{
/*
* Assignment: declare and initialize variables for the following types:
* string
* int
* char
* bool
* double
* decimal
*/
string dogName = "Ralph";
int dogAge = 9;
char firstInital = dogName[0];
double foodAmount = 0.25;
decimal milesWalkDaily = 1.50m;
bool truth = false;
Console.WriteLine($"My dog's name is {dogName}, He is {dogAge} years old. He eats {foodAmount} cup of food per meal. We go for a walk of {milesWalkDaily} daily. This above statment is all true: {truth}");
Console.ReadLine();
}
}
}