Pratical 1
Pratical 1
namespace newprogram
{
class program
{
static void Main(string[] args)
{
Console.WriteLine("hello world");
string boy = "precious";
string girl = "michael";
int a = 15;
int b = 20;
Console.WriteLine("my name is " + boy + " i am " + b + " years old ");
int x = 5;
x += 5;
a += 4;
Console.WriteLine(x);
int y = 3;
bool z = x > y;
Console.WriteLine(z);
bool aa = x == y;
Console.WriteLine(a);
if (x != y)
{ Console.WriteLine("x and y are not equal"); }
else
{
Console.WriteLine("they are both equal");
}
Console.WriteLine("precious what is the time");
int time = Convert.ToInt32(Console.ReadLine());
if (time < 13)
{
Console.WriteLine("good morning");
}
else
if (time > 16)
{
Console.WriteLine("good afternoon");
}
else
{
Console.WriteLine("good evening");
switch (day)
{
case "day 1":
Console.WriteLine("it's sunday");
break;
default:
Console.WriteLine(" we only have 7 days in a week:");
break;
}
}
}