Advertisement
Fundamentalen

FormattingNumbers

Mar 16th, 2014
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. using System;
  2.  
  3. class FormattingNumbers
  4. {
  5.     static void Main()
  6.     {
  7.         int a = int.Parse(Console.ReadLine());
  8.         double b = double.Parse(Console.ReadLine());
  9.         double c = double.Parse(Console.ReadLine());
  10.  
  11.         Console.WriteLine("|{0, -10:X}|{1, 10}|{2, 10:F2}|{3, -10:F3}|", a, Convert.ToString(a, 2).PadLeft(10, '0'), b, c);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement