Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 01.05.2021
- import java.util.Scanner;
- public class Ex03 {
- 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();
- // part a
- c = 180 - a - b;
- System.out.println("c= " + c);
- // part b
- if ((a == 60) && (b == 60) && (c == 60)) {
- System.out.println("Motaswee aladla3");
- }
- if ((a == b) || (a == c) || (b == c)) {
- System.out.println("Motasawe al-sakain");
- }
- // part c
- if ((a == 90) || b == 90 || c == 90) {
- System.out.println("Kaem alzaweia");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement