//C#: //Standard bemenetrol szam beolvasas: long a, b; string s = Console.ReadLine(); string[] szamok = s.Split(' '); a = Convert.ToInt32(szamok[0]); b = Convert.ToInt32(szamok[1]); //EOF-ig while: string x; x = Console.ReadLine(); while (true) { if (x == null) break; x = Console.ReadLine(); } //Split hasznalata: string par; par = Console.ReadLine(); string[] s = par.Split(' '); //Float formazas: // just two decimal places String.Format("{0:0.00}", 123.4567); // "123.46" String.Format("{0:0.00}", 123.4); // "123.40" // max. two decimal places String.Format("{0:0.##}", 123.4567); // "123.46" String.Format("{0:0.##}", 123.4); // "123.4" //thousands separator String.Format("{0:0,0.0}", 12345.67); // "12,345.7" String.Format("{0:0,0}", 12345.67); // "12,346" //Java: //Standard bemenetrol scanner hasznalata: Scanner sc = new Scanner(System.in); String s=sc.nextLine(); //Int-e alakitas: int x=Integer.parseInt(sc.nextLine()); //SPACE szerint splitteles: String par=sc.nextLine(); s = par.split("\\s"); //Ket string osszehasonlitasa: s.equals("Valami"); //String.Format: System.out.println(String.format( "%.2f" ,x ));