Now Srsly Where Is My Problem ?
//WAY ONE
when i run it
//Whistle nothing happened
-I write Kevin
-I write 8
//Output:
Error ❌❌❌
//Tried in my codeEditor...
//Output:
Kevin will take care over the world in 8 years. Mwa-ha-ha! ???
/*
Plan to conquer the world
*/
import java.io.*;
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 number = scanner.nextInt();
System.out.println(name + " will take over the world in " + number + " years. Mwa-ha-ha!");
}
}
//WAY TWO
Plan to conquer the world
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your codehere
InputStreamReader ISR = new InputStreamReader(System.in);
BufferedReader BR = new BufferedReader(ISR);
String name = BR.readLine();
int number = BR.readInt();
System.out.println(name + " will take care over the world in " + number + " years. Mwa-ha-ha!");
}
}
package com.codegym.task.task03.task0318;
/*
Plan to conquer the world
*/
import java.io.*;
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 number = scanner.nextInt();
//System.out.println(name + " will take over the world in " + number + " years. Mwah-ha-ha!");
InputStreamReader ISR = new InputStreamReader(System.in);
BufferedReader BR = new BufferedReader(ISR);
String name = BR.readLine();
int number = BR.readInt();
System.out.println(number + " will take care over the world in " + name + " years. Mwa-ha-ha!");
}
}