Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Ex01 {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- double n1, n2;
- System.out.println("enter n1 value: ");
- n1 = in.nextDouble();
- System.out.println("enter n2 value: ");
- n2 = in.nextDouble();
- if (n1 > 9) {
- n1 = 5;
- } else {
- n1 = 3;
- }
- System.out.println("n1 = " + n1);
- System.out.println("n2 = " + n2);
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement