This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | Next revision Both sides next revision | ||
|
java:exceptions_intro [2017/03/10 11:15] gthanos |
java:exceptions_intro [2018/03/12 07:50] gthanos |
||
|---|---|---|---|
| Line 18: | Line 18: | ||
| | | ||
| - | int x; | + | int x, y; |
| - | | + | |
| - | int result; | + | int result; |
| - | Scanner input = new Scanner(System.in); | + | Scanner input = new Scanner(System.in); |
| - | | + | |
| - | x = input.nextInt(); | + | x = input.nextInt(); |
| - | | + | |
| - | y = input.nextInt(); | + | y = input.nextInt(); |
| - | + | ||
| - | result = x/y; | + | result = x/y; |
| - | + | ||
| - | System.out.printf( " | + | System.out.printf( " |
| + | } | ||
| } | } | ||
| } | } | ||