+ 3

please make me know following code is working and if not whats the error ? i want to know how to get multiple user inputs in jav

/*Vacation planner! 1.Enter the name 2.enter the place 3.enter how many days are you going to spend 4.enter how much money are you going to spend i USD(dont enter the symbol of currency) 5.enter the three letter symbol of currency of your destination 6.enter how much (that currency) = to USD(ex; 148.98LKR=1USD(enter without symbols) 7.enter the latitudes of your starting point 8.enter the latitudes of destination 9.enter the longitudes of starting point 10.enter the longitudes ending point */ import java.util.Scanner; public class Program{ public static void main(String[] args) { System.out.println("welcome to vacation planner !"); Scanner Cs = new Scanner(System.in); String name = Cs.nextLine(); System.out.println("What is your name ?"); System.out.print("nice to meet you "+ name); System.out.println(",where are you travelling to"); String place = Cs.nextLine(); System.out.print("Great ! "+place); System.out.println( " Sounds like a great trip."); //time = days spend int time = Cs.nextInt(); System.out.println("How many days are you going to spend travelling ? "+time); double USD = Cs.nextDouble(); //amount of money going to spend in USD. System.out.println("How much money are you going to spend on your trip in (USD) ?" + USD); //symbol of currency of destination. String symbol = Cs.nextLine(); System.out.println("What is the three letter currency symbol of your travel destination ? "+symbol); //ccc=price of that currency for 1USD. double CCC = Cs.nextDouble(); System.out.print("How much "+symbol); System.out.print(" are there in 1 USD ? "+CCC); //time conversion int hor = time * 24; int min = time *24*60; System.out.print("if you are travelling for "+time); System.out.print(" that is same as "

29th Oct 2017, 7:45 AM
E Vision
E Vision - avatar
8 Answers
+ 5
for each nextLine() method you have made is a new user input. you access these by pressing run in playground and inserting info on seprate lines then press submit
29th Oct 2017, 9:37 AM
D_Stark
D_Stark - avatar
+ 4
thanks brother
3rd Nov 2017, 5:04 AM
E Vision
E Vision - avatar
+ 3
https://code.sololearn.com/#java This is the code am troubling to find correct or wrong, if wrong i need to know how to write it correctly.
31st Oct 2017, 10:57 AM
E Vision
E Vision - avatar
31st Oct 2017, 11:00 AM
E Vision
E Vision - avatar
+ 3
Gordie can you fix it?
2nd Nov 2017, 3:30 AM
E Vision
E Vision - avatar