Write a program called
CheckPassFail
which prints "PASS
" if the int
variable "mark
" is more than or equal to 50
; or prints "FAIL
" otherwise.
Hints:
public class CheckPassFail { // saved as "CheckPassFail.java"
public static void main(String[] args) {
int mark = 49; // set the value of mark here!
System.out.println("The mark is " + mark);
if ( ...... ) {
System.out.println( ...... );
} else {
System.out.println( ...... );
}
}
}
Comment your Answers :)
0 comments:
Post a Comment