Advertisement
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 HelloWorld
- {
- class Program
- {
- static void Main(string[] args)
- {
- int age = 50;
- int colegeTest = 10 + ++age;
- age +=23;
- int test2 = 10 + 34* 8;
- char firstLetter = 'S';
- float myMoney = 2.34f;
- string name = "Stoyan";
- sbyte test = -128;
- bool isMail = true;
- object myObject = 5;
- int result = age + test;
- bool logResult = age < test;
- Console.WriteLine("Hello World! I am " + age + " years old. My name starts with " + firstLetter + "My money " + myMoney);
- Console.WriteLine("My name is " + name + test);
- Console.WriteLine("My I a mail: " + isMail);
- Console.WriteLine("Result " + result);
- Console.WriteLine("loResult " + logResult);
- Console.WriteLine("colege " + colegeTest);
- // string readCOnsole = Console.ReadLine();
- // Console.WriteLine("You have entered " + int.Parse(readCOnsole));
- Console.WriteLine("Please eneter your age: ");
- int userAge = int.Parse(Console.ReadLine());
- /*
- if (userAge < 20)
- {
- Console.WriteLine("You are an teenager!!!");
- }
- else if (userAge < 50 && userAge > 30) {
- Console.WriteLine("You are in the middle age");
- }
- else {
- Console.WriteLine("You are not in our age ranges");
- }
- */
- switch (userAge)
- {
- case 20:
- Console.WriteLine("You are 20 years old");
- break;
- default:
- Console.WriteLine("Nothing else matches");
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement