## IN ***JAVA***- Lucky Number
A four-digit number `ABCD` is called lucky if `A` + `B` = `C` + `D`
Write a program that asks the user to enter a four-digit number and tell if the number is a lucky
number or not. if it's a lucky number print `Yay, <number> is a lucky number`, otherwise
print `Nah, <number> is not a lucky number`
**Example 1:**
```text
Please enter 4 digits number:
>3719
Yay, 3719 is a lucky number
```
**Example 2:**
```text
Please enter 4 digits number:
>3521
Nah, 3521 is not a lucky number
```
## IN ***JAVA***- Lucky Number A four-digit number `ABCD` is called lucky if `A` + `B` = `C` + `D` Write a program th
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
## IN ***JAVA***- Lucky Number A four-digit number `ABCD` is called lucky if `A` + `B` = `C` + `D` Write a program th
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!