Skip to content

Instantly share code, notes, and snippets.

@thetekst
Created February 18, 2011 08:01
Show Gist options
  • Save thetekst/833400 to your computer and use it in GitHub Desktop.
Save thetekst/833400 to your computer and use it in GitHub Desktop.
1.2 Java home
/*Напишите программу, которая вводит число, а
выводит на единичку больше.*/
import java.util.Scanner;
public class HelloWorld {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
int b = Integer.parseInt(s);
b++;
System.out.println(b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment