Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace operatorsTest
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = 6;
- int b = 4;
- Console.WriteLine(a > b ? "a>b" : "b>=a"); // a>b
- Console.WriteLine(a is int); // True
- Console.WriteLine(b is double); // False
- Console.WriteLine(sizeof(double)); //8 байта (double е 64 битов тип)
- Console.WriteLine(typeof(float)); //System.Single
- Console.WriteLine((a + b) / 2); // 5
- string scream = new string('a', 10);
- Console.WriteLine(scream);
- string greeting = null;
- Console.WriteLine(greeting ?? "Hello");
- greeting = "Hi!";
- Console.WriteLine(greeting ?? "Hello");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment