0

plz explain me this code

import java.util.Scanner; import java.io.*; class Scd { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int rno=sc.nextInt(); float per=sc.nextFloat(); String name=sc.nextLine(); System.out.println("tour details"); System.out.println("name="+name); System.out.println("rno="+rno); System.out.println("per="+per); } }

6th Jul 2018, 1:03 PM
anju
1 Odpowiedź
+ 1
import java.util.Scanner; import java.io.*; class Scd { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int rno=sc.nextInt(); //Reads user's input as an integer. float per=sc.nextFloat(); //Reads as float. String name=sc.nextLine(); //Reads as a string. System.out.println("tour details"); //Prints the values. System.out.println("name="+name); System.out.println("rno="+rno); System.out.println("per="+per); } }
6th Jul 2018, 1:14 PM
Disvolviĝo;
Disvolviĝo; - avatar