import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
String name = scanner.next();
int years = scanner.nextInt();
System.out.print(name.nextLine() +"will take over the world in "+ number.nextLine() " years. Mwa-ha-ha!");
}
}
how to do
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
shaan mohd khan QA Automation Engineer at mphasis Ltd
13 February 2019, 19:08
package com.codegym.task.task03.task0318;
/*
Plan to conquer the world
*/
import java.io.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner scanner= new Scanner(System.in);
String name= scanner.nextLine();
int year= scanner.nextInt();
System.out.println(name+" will take over the world in "+year+" years. Mwa-ha-ha!");
}
}
0