using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication16 { class Program staticvoid Main(string[] args) { double x, y; x = double.Parse(Console.ReadLine()); y = double.Parse(Console.ReadLine()); if(x > y) Console.WriteLine("x {0}", x); else Console.WriteLine("y {0}", y); Console.ReadKey(); } } } ___________________________________________
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication16 { class Program { staticvoid Main(string[] args) { int x = 8; Console.WriteLine(x++); Console.WriteLine(++x); Console.ReadKey(); } } } ________________________________________________
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication16 { class Program staticvoid Main(string[] args) { int i, n; i = 1; Console.Write("Wprowadź ilość wysietlanych słów: "); n=Convert.ToInt16(Console.ReadLine()); while(i<=n) { Console.Write("Napis "); i++; } Console.ReadKey(); } } } _________________________________________________________ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication16 { class Program staticvoid Main(string[] args) { Console.WriteLine("wprowadź n: "); int n = int.Parse(Console.ReadLine()); int i = 1; while(i<=n) { if(i % 2 != 0) Console.WriteLine(i); i++; } Console.ReadKey(); } } }