+ 2
Why string t is not adding in string s
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int i = 4; double d = 4.0; String s = "HackerRank"; int m; double n; String t; m = scan.nextInt(); n = scan.nextDouble(); t = scan.nextLine(); System.out.println(i+m); System.out.println(d+n); System.out.println(s+t); } }
4 Respuestas
+ 6
Maybe you should concat the 2 strings?
+ 6
I think there is a problem with the Scanner.
+ 1
yes i heard about concat... how to do it
+ 1
no