![]() |
IOBit Software
|
|
|
||||||
| Programming Place to discuss programming including HTML, Java, C++, MySQL and others. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
import java.io.*;
public class Contohif { public static void main (String[]args) { BufferedReader input = newBufferedReader (new InputStreamReader)(System.in)); try { System.out.print("Nilai ujian Anda: "); String at = input.readLine(); int nilaiUjian = Integer.valueOf(st).intValue(); char hurufMutu; if (nilaiUjian >= 80) { hurufMutu = 'A'; } else if (nilaiUjian >= 65) { hurufMutu = 'B'; } else if (nilaiUjian >= 55) { hurufMutu = 'C'; } else if (nilaiUjian >= 45) { hurufMutu = 'D'; } else { hurufMutu = 'E'; } System.out.println("Huruf Mutu" + hurufMutu); } catch (Exception.e) { } } } |
| Sponsored links |
|
|
|
#2
|
||||
|
||||
|
A parser would show you that line 4 has an extra closing paren. Did your compiler not give you an error message?
__________________
I.think(code); I.eat(code.spaghetti); |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Whats wrong | nuss2073 | Malware Removal | 1 | 05-03-10 13:05 |
| Whats wrong with it? | Dusten | Malware Removal | 10 | 10-31-06 21:04 |
| whats wrong with my yim | MOUMANTAI | Software | 2 | 06-17-06 06:28 |
| whats wrong with my pc | laserbrain | Hardware | 4 | 02-03-05 00:24 |
| Don't know whats wrong...maybe someone can tell me. | ThanksInAdvance | Software | 7 | 08-21-03 12:56 |