import java.io.*;
import Text;
public class FormatTest
{  public static void main(String[] args) throws IOException
         {
      double x = 1.23456789012;
      double y = 123;
      double z = 1.2345e30;
      double w = 1.02;
      double u = 1.234e-5;
      int d = 0xCAFE;
      Text.print(System.out, "x = |%f|\n", x);
      Text.print(System.out, "u = |%20f|\n", u);
      Text.print(System.out, "x = |% .5f|\n", x);
      Text.print(System.out, "w = |%20.5f|\n", w);
      Text.print(System.out, "x = |%020.5f|\n", x);
      Text.print(System.out, "x = |%+20.5f|\n", x);
      Text.print(System.out, "x = |%+020.5f|\n", x);
      Text.print(System.out, "x = |% 020.5f|\n", x);
      Text.print(System.out, "y = |%#+20.5f|\n", y);
      Text.print(System.out, "y = |%-+20.5f|\n", y);
      Text.print(System.out, "z = |%20.5f|\n", z);

      Text.print(System.out, "x = |%e|\n", x);
      Text.print(System.out, "u = |%20e|\n", u);
      Text.print(System.out, "x = |% .5e|\n", x);
      Text.print(System.out, "w = |%20.5e|\n", w);
      Text.print(System.out, "x = |%020.5e|\n", x);
      Text.print(System.out, "x = |%+20.5e|\n", x);
      Text.print(System.out, "x = |%+020.5e|\n", x);
      Text.print(System.out, "x = |% 020.5e|\n", x);
      Text.print(System.out, "y = |%#+20.5e|\n", y);
      Text.print(System.out, "y = |%-+20.5e|\n", y);
      
      Text.print(System.out, "x = |%g|\n", x);
      Text.print(System.out, "z = |%g|\n", z);
      Text.print(System.out, "w = |%g|\n", w);
      Text.print(System.out, "u = |%g|\n", u);
      Text.print(System.out, "y = |%.2g|\n", y);
      Text.print(System.out, "y = |%#.2g|\n", y);

      Text.print(System.out, "d = |%d|\n", d);
      Text.print(System.out, "d = |%20d|\n", d);            
      Text.print(System.out, "d = |%020d|\n", d);    
      Text.print(System.out, "d = |%+20d|\n", d);
      Text.print(System.out, "d = |% 020d|\n", d);
      Text.print(System.out, "d = |%-20d|\n", d);
      Text.print(System.out, "d = |%20.8d|\n", d);
      Text.print(System.out, "d = |%x|\n", d);            
      Text.print(System.out, "d = |%20X|\n", d);    
      Text.print(System.out, "d = |%#20x|\n", d);
      Text.print(System.out, "d = |%020X|\n", d);
      Text.print(System.out, "d = |%20.8x|\n", d);
      Text.print(System.out, "d = |%o|\n", d);            
      Text.print(System.out, "d = |%020o|\n", d);    
      Text.print(System.out, "d = |%#20o|\n", d);
      Text.print(System.out, "d = |%#020o|\n", d);
      Text.print(System.out, "d = |%20.12o|\n", d);
      
      Text.print(System.out, "s = |%-20s|\n", "Hello");      
      Text.print(System.out, "s = |%-20c|\n", '!');
        
         }
}



