Commits

Anonymous committed 190ea32

minor

  • Participants
  • Parent commits 4c0865d

Comments (0)

Files changed (2)

File console/Program.cs

 {
 	class Program
 	{			
+		// string
+		
+		//  integer 8bit  | sbyte | System.SByte
+		//  integer 16bit | short | System.Int16
+		//	integer 32bit | int   | System.Int32
+		//  integer 64bit | long  | System.Int64
+		//
+		//  unsigned integer 8bit  | byte   | System.Byte
+		//  unsigned integer 16bit | ushort | System.UInt16
+		//	unsigned integer 32bit | uint   | System.UInt32
+		//  unsigned integer 64bit | ulong  | System.UInt64
+		
+		// double - 64bit
+		// float  - floating point number 32bit
+		
+		// bool		
+		// true, false
+		
+		// 1 bit: 0, 1
+		//        0x0, 0x1
+		//
+		// 2 bit: (0, 1), (0, 1)
+		//        00, 01, 10, 11
+		//         0   1   2   3
+		//        0x0, 0x3
+		//
+		// 3 bit:  000,  001,  010,  011,  100,  101,  110, 111
+		//           0     1     2     3     4     5     6    7
+		//         0x0, 0x7
+		//
+		// 4 bit: 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111
+		//           0     1     2
+		//        1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111
+		//           8     9     A     B     C     D     E     F
+		//                      10    11    12    13    14    15
+		//        0x0..0xF
+		//							
+		//        b[i] * 2^i
+		//        
+		// 16-based, hex: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
+		//                0xFF34CADF
+		//
+		// byte = 8 bit 0..255 (2^8 - 1)
+		//        0x00..0xFF
+		//
+		// 16 bit = 0..65535
+		//          0x0000..0xFFFF
+		//
+		// 32 bit = 0x00000000..0xFFFFFFFF
+		//
+		// color: RGB: #1AFED3 ~10%, ~100%, ~80%
+		//
+		// 2^10 = 1024
+		public static bool IsZero(System.Int32 x)
+		{
+			return x == 0;
+		}
+		
 		public static void Apples(int x)
 		{
+			bool isXZero = IsZero(x);
 			if(x == 0)
 			{
 				Console.WriteLine("No apples");
 			switch(x)
 			{
 				case 0:
-					Console.WriteLine("No apples");
+					Console.WriteLine("no apples");
 					break;
 				case 1: 					
 					Console.WriteLine("one apple");
 					break;
 			}
 		}
-		
-		public static double Power5(double x)
-		{
-			double x2 = x * x;
-			double x4 = x * x;
-			return x4 * x;
-		}		
-		
+	
 		public static void Main(string[] args)
-		{	
-			// Console.WriteLine("pi = " + Math.PI);
-			// Console.WriteLine("a ^ 4 = " + Power5(4.0));			
-			
+		{			
 			Apples(5);
 			Apples(1);			
 			Apples(0);
-			Console.Write("Press any key to instole the game ");
 			Console.ReadKey(true);
 		}
 	}
         <li>
             <a href="http://tortoisehg.bitbucket.org/">TortoiseHg</a>.
         </li>
+        <li>
+            <a href="http://getpaint.net/">Paint.Net</a>.
+        </li>
     </ul>
     <h2>2. Читать</h2>
     <ul>
             </ul>
         </li>
     </ul>
-    <h2>Компилятор on-line.</h2>
-    <p>
-        <a href="http://ideone.com/">ideone.com</a>.
-    </p>
 </body>
 </html>