MajorGeeks Support Forums IOBit Software

Go Back   MajorGeeks Support Forums > Majorgeeks.Com - Support Forums > Programming
Register FAQ Members List Calendar Casino Mark Forums Read

Programming Place to discuss programming including HTML, Java, C++, MySQL and others.


Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-12, 02:25
erdy_rezki erdy_rezki is offline
Private E-2
 
Join Date: Apr 2012
Location: indonesia
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Default whats wrong with my code

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)
{
}
}
}
Reply With Quote
Sponsored links
  #2  
Old 04-21-12, 14:27
PC-XT's Avatar
PC-XT PC-XT is offline
Master Sergeant
 
Join Date: Oct 2007
Location: on a farm
Posts: 637
Thanks: 23
Thanked 73 Times in 70 Posts
Default Re: whats wrong with my code

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);
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -5. The time now is 00:57.


MajorGeeks.Com Home Page
| Admin Tools | All In One | Anti-Spyware | Anti-Virus | Appearance | Backup | Benchmarking | BIOS | Browsers | Covert Ops |
Data Recovery | Diagnostics | Drive Cleaners | Drive Utilities | Drivers | Driver Tools Ergonomics | Firewalls | Games | Game Tweaks | Graphics | Input Devices | Internet Tools | Macintosh | Mail Utilities | Memory | Messaging | Monitoring | Microsoft | Multimedia | Networking | Office Tools | Process Management | Processor | Registry | Security | System Info | Toys | Video | Miscellaneous
|

-->
Powered by vBulletin® Version 3.8.4
Copyright © 2009 vBulletin Solutions, Inc. All rights reserved.
Ad Management by RedTyger