|
|
back to boardhow solve if doesn't so, please help me Posted by Error 27 Apr 2011 23:40 package javaapplication; import java.util.Scanner; public class InputScan { public static void main( String args[] ) { Scanner input = new Scanner( System.in ); int a; int b; System.out.println( "Эта программа отображает сумму двух чисел." ); System.out.print( "Введите первое целое число: " ); a = input.nextInt(); System.out.print( "Введите второе целое число: " ); b = input.nextInt(); System.out.printf( "Сумма %d\n", a+b ); } } Re: how solve if doesn't so, please help me Posted by =NRZ= 29 Apr 2011 23:25 int a; int b; a = input.nextInt(); b = input.nextInt(); System.out.printf( "%d\n", a+b ); Re: how solve if doesn't so, please help me int a; int b; int r; a = input.nextInt(); b = input.nextInt(); r = a + b; System.out.printf( "%d\n", r ) |
|
|