We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */importjava.math.BigInteger;importjava.util.ArrayList;importjava.util.Arrays;importjava.util.Collections;importjava.util.Comparator;importjava.util.HashMap;importjava.util.HashSet;importjava.util.Map;importjava.util.Scanner;importjava.util.Set;importjava.util.StringTokenizer;importjava.util.TreeMap;importjava.util.TreeSet;/** * * @author Thinh_Nguyen */publicclassjavaanhlocday{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);System.out.println("================================");for(inti=0;i<3;i++){Strings=sc.next();intn=sc.nextInt();Stringnumber=String.format("%03d",n);Stringspaces="";for(intj=1;j<=(15-s.length());j++)spaces=spaces+" ";System.out.println(s+spaces+number);}System.out.println("================================");}}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Output Formatting
You are viewing a single comment's thread. Return to all comments →