0% found this document useful (0 votes)
2 views3 pages

2# Variables & Datatypes Concatenation

The document contains multiple C# code snippets demonstrating variable declaration, data types, and string concatenation. It showcases how to output personal information such as name, age, weight, and sex using the Console class. Each snippet illustrates different ways to format and display text in the console.

Uploaded by

Lesunter KLter
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)
2 views3 pages

2# Variables & Datatypes Concatenation

The document contains multiple C# code snippets demonstrating variable declaration, data types, and string concatenation. It showcases how to output personal information such as name, age, weight, and sex using the Console class. Each snippet illustrates different ways to format and display text in the console.

Uploaded by

Lesunter KLter
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/ 3

1# Variable & DataType Concatenation

using System;
namespace darklter
{
class Program
{
static void Main(string[] args)
{
Console.Write("helo tae \n tae ");
}
}
}

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||

using System;
namespace darklter
{
class Program
{
static void Main(string[] args)
{
char sex = 'M';
string name = "DarKLter";
int age = 19;
bool isTall = true;
double grade = 95.5;
float average = 95.5f;
}
}
}

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||

using System;
namespace darklter
{
class Program
{
static void Main(string[] args)
{
string name = "DarKLter";
int age = 18;

Console.Write("My Name Is ");


Console.WriteLine(name);
Console.Write("My Age Is ");
Console.WriteLine(age);

age = 19;

Console.Write("My Age Is ");


Console.WriteLine(age);
}
}
}

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||

using System;
namespace darklter
{
class Program
{
static void Main(string[] args)
{
string name = "DarKLter";
int age = 18;

Console.WriteLine("My Name Is " + name);


Console.WriteLine("I' Am " + age + " years old.");
}
}
}

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||

using System;
namespace darklter
{
class Program
{
static void Main(string[] args)
{
string name = "Karl Lester Paular";
int age = 19;
float weight = 55.6f;
char sex = 'M';

Console.WriteLine("Hi My Name is " + name);


Console.WriteLine("I' am " + age + " years old.");
Console.WriteLine("My Weight is " + weight);
Console.WriteLine("My Sex is " + sex);
}
}
}

You might also like