Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String town = scanner.nextLine();
- int population = Integer.parseInt(scanner.nextLine()),
- area = Integer.parseInt(scanner.nextLine());
- System.out.printf("Town %s has population of %d and area %d square km.\n", town, population, area);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement