ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1000. A+B Problem

how 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
Posted by Brunno de Godoy Amorim 14 May 2011 05:33
int a;
int b;
int r;
a = input.nextInt();
b = input.nextInt();
r = a + b;
System.out.printf( "%d\n", r )