|
|
back to boarda + b import java.util.Scanner; public class firstexercise{ public static void main(String[]args){ Scanner scanner=new Scanner(System.in); int c=0; System.out.println("Введите первое число."); int a=scanner.nextInt(); System.out.println("Введите второе число."); int b=scanner.nextInt(); c=a+b; System.out.println("Ответ = " + c); } } Re: a + b Posted by nubpun 29 Mar 2014 10:28 ы Re: a + b Posted by nubpun 29 Mar 2014 10:28 ы Re: a + b There should be no prompt message and output only answer: import java.util.Scanner; public class firstexercise{ public static void main(String[]args){ Scanner scanner=new Scanner(System.in); int c=0; int a=scanner.nextInt(); int b=scanner.nextInt(); c=a+b; System.out.println(c); } } |
|
|