Advertisement
Guest User

Untitled

a guest
Mar 27th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using System;
  2. class VirtualColums
  3. {
  4.     static void Main()
  5.     {
  6.         int a;
  7.         do
  8.         {
  9.             Console.Write("int a (0...500) = ");
  10.             a = int.Parse(Console.ReadLine());
  11.         }
  12.         while (a < 0 || a > 500);
  13.         Console.Write("float b = ");
  14.         float b = float.Parse(Console.ReadLine());
  15.         Console.Write("float c = ");
  16.         float c = float.Parse(Console.ReadLine());
  17.  
  18.         Console.WriteLine("|{0,-10:X}|{1,-10}|{2,10}|{3,-10:F3}|", a, Convert.ToString(a, 2), b, c);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement