We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Sorry for being annoying, there we go, i fixed it this way, now everything is working, but anyways, send me the code please on how it suppose to look with scan.hasNext(); and then scan.next(); without doing a do while, thank you!
/* Declare second integer, double, and String variables. */inti1;doubled1;Strings1;/* Read and save an integer, double, and String to your variables.*/i1=scan.nextInt();d1=scan.nextDouble();/* Print the sum of both integer variables on a new line. */System.out.println(i+i1);/* Print the sum of the double variables on a new line. */System.out.println(d+d1);/* Concatenate and print the String variables on a new line; the 's' variable above should be printed first. */System.out.print(s);while(scan.hasNext()==true){s1=scan.next();System.out.print(s1+" ");}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Data Types
You are viewing a single comment's thread. Return to all comments →
Sorry for being annoying, there we go, i fixed it this way, now everything is working, but anyways, send me the code please on how it suppose to look with scan.hasNext(); and then scan.next(); without doing a do while, thank you!