Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package prj01052021;
- // 01.05.2021
- import java.util.Scanner;
- public class Ex04 {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- int a, b, c;
- // input data from user
- System.out.print("Enter a: ");
- a = in.nextInt();
- System.out.print("Enter b: ");
- b = in.nextInt();
- System.out.print("Enter c: ");
- c = in.nextInt();
- if ((a < b + c) && (b < a + c) && (c < a + b)) {
- System.out.println("Mothalth OK");
- System.out.println("Moheet = " + (a + b + c));
- } else {
- System.out.println("Error");
- }
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement