You are viewing a single comment's thread. Return to all comments →
import java.io.; import java.util.;
public class Solution {
public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("=".repeat(32)); for(int i = 0; i <3; i+=1) { String str = sc.nextLine(); String program = str.substring(0, str.indexOf(" ")); String version = str.substring(str.indexOf(" "), str.length()).trim(); version = (version.length() < 3)? "0".repeat(3-version.length())+version: version; System.out.println(program + " ".repeat(15-program.length())+ version); } System.out.print("=".repeat(32)); sc.close(); }
}
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 →
import java.io.; import java.util.;
public class Solution {
}