public class MenggunakanIfelseIf
{
public static void main( String[] args )
{
double nilai = 100.0;
if( nilai>= 90 ){
System.out.println( "sempurna!" );
}
else if( (nilai< 90) && (nilai>= 70)){
System.out.println("bagus!" );
}
else if( (nilai< 70) && (nilai>= 60)){
System.out.println("cukup!" );
}
else{
System.out.println("gagal.");
}
}
}
No comments:
Post a Comment