fork download
  1. // ШАГ, C#. Урок 1
  2. // Свой пример на логический тип данных
  3.  
  4. using System;
  5.  
  6. public class Test
  7. {
  8. public static void Main()
  9. {
  10. bool equal_1 = ( 5 == 10 );
  11. Console.WriteLine( " 5 == 10? " + equal_1);
  12.  
  13. System.Boolean equal_2 = ( 10 == 10 );
  14. Console.WriteLine( "10 == 10? " + equal_2);
  15.  
  16. bool t = true;
  17. bool f = false;
  18. Console.WriteLine("t = " + t + ", f = " + f);
  19. }
  20. }
Success #stdin #stdout 0.03s 15912KB
stdin
Standard input is empty
stdout
 5 == 10? False
10 == 10? True
t = True, f = False