Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
561 B
1
Indexable
Never
import java.util.Scanner;

public class App {
    public static void main(String[] args) throws Exception {
        System.out.println("Hello, World!");
        Scanner input = new Scanner(System.in);

        System.out.print("Please enter a no:");
        int mark = input.nextInt();
        if (mark >=0 && mark <=100)
            System.out.print(mark +" is a valid mark.");
        else if (mark <0)
            System.out.print(mark +" is not a valid mark.");
        else
            System.out.print(mark + " is a valid mark");
    }
}