Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Write a program that takes as an input a grade and prints "Passed!" if the grade is equal or more than 3.00.
- //The input comes as a single floating-point number.
- //The output is either "Passed!" if the grade is equal or more than 3.00, otherwise, you should print nothing.
- import java.util.Scanner;
- public class Pass{
- public static void main(String[] args) {
- //Source Code
- Scanner sc = new Scanner(System.in);
- double grade = Double.parseDouble(sc.nextLine());
- if (grade >= 3.00) {
- System.out.println("Passed!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement