import java.io.*; /* Konzolový vstup - řádkový vstup: soubor Vstup.java*/ /* Soucet a prumer tri cisel a,b,c */ public class RadkovyVstup { static double p; static int s, a, b, c; public static void main(String[] args) throws IOException { BufferedReader vstup = new BufferedReader(new InputStreamReader(System.in)); System.out.print("Zadej a: "); a = (new Integer(vstup.readLine())).intValue(); System.out.print("Zadej b: "); b = (new Integer(vstup.readLine())).intValue(); System.out.print("Zadej c: "); c = (new Integer(vstup.readLine())).intValue(); s = a + b + c; System.out.println("soucet tri cisel s = " + s); p = (float) s / 3; System.out.println("prumer tri cisel p = " + p); vstup.close(); } }