0% found this document useful (0 votes)
9 views2 pages

Pratical 1

Uploaded by

preciousmic1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

Pratical 1

Uploaded by

preciousmic1234
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

using System;

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 ");

Console.WriteLine("hello please creat an account with your name");


string name = Console.ReadLine();
Console.WriteLine("please input a username");
string username = Console.ReadLine();
Console.WriteLine("your name: " + name + "and username:" + username +
"has been accepted. your account has been created");

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");

Console.WriteLine("precious what number is it today in the days of the


week");
string day = Console.ReadLine();

switch (day)
{
case "day 1":
Console.WriteLine("it's sunday");
break;

case "day 2":


Console.WriteLine("it's monday");
break;

case "day 3":


Console.WriteLine("it's tuesday");
break;

case "day 4":


Console.WriteLine("it's wednesday");
break;

case "day 5":


Console.WriteLine("it's thursday");
break;

case "day 6":


Console.WriteLine ("it's friday");
break;

case "day 7":


Console.WriteLine("it's saturday");
break;

default:
Console.WriteLine(" we only have 7 days in a week:");

break;

}
}
}

You might also like