Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace HelloKristina
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hello World!");
- byte myByte = 255;
- sbyte mySByte = -128;
- short myShort = 123;// -2^15 2^15 - 1
- ushort myUshort = 65535;
- long myLong = -3424523;
- ulong myUlong = 45435;
- int age1 = 55;
- int age2 = 18;
- int ageResult;
- ageResult = age1 + age2;
- float myFloat = 3.12345645455353453f;
- double myDouble = 12.4353454354353453454353453453453454;
- decimal decimalPI = 3.14159265358979323846m;
- Console.WriteLine(decimalPI); // 3.14159265358979323846
- Console.WriteLine(myFloat);
- Console.WriteLine(myDouble);
- char myChar = 'P';
- myChar = '\u0041'; // myChar = 'A';
- string myString = "Petya";
- bool myBool = true; // false | true
- // Object myObject = 3;
- Console.WriteLine(myChar);
- Console.WriteLine(ageResult);
- int a = 11;
- int b = 2;
- Console.WriteLine(a + b);
- Console.WriteLine(a - b);
- Console.WriteLine(a / b);
- Console.WriteLine(a * b);
- Console.WriteLine(a++);
- Console.WriteLine(a);
- Console.WriteLine(++a);
- Console.WriteLine(a % b);
- Console.WriteLine(--a);
- Console.WriteLine(a--);
- Console.WriteLine(a > b);
- Console.WriteLine(a < b);
- Console.WriteLine(a >= b);
- Console.WriteLine(a <= b);
- Console.WriteLine(a == b);
- Console.WriteLine(a != b);
- bool x = true;
- bool y = false;
- Console.WriteLine(x && y);
- Console.WriteLine(x || y);
- Console.WriteLine(x ^ y);
- Console.WriteLine(!x);
- a += 3; // a = a + 3;
- Console.WriteLine(1 << 1);
- Console.WriteLine(2 >> 1);
- Console.WriteLine(1 | 2);
- Console.WriteLine(1 & 2);
- Console.WriteLine(1 ^ 3);// 2
- string name = "Stoyan";
- string familyName = "Cheresharov";
- Console.WriteLine(name + " " + familyName + a);
- int test1 = 11;
- int test2 = 2;
- Console.WriteLine(test1 / (float)test2);
- }
- }
- }
- /*
- class HelloKrisitna
- {
- public static void Main()
- {
- System.Console.WriteLine("Hello Kristina!");
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement