Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by User on 2/8/2017.
- * I eat tons of dick everyday, my dickshake brings all the hoes to the yard bitch
- */
- import java.util.*;
- public class WEIlon {
- public static Scanner r1 = new Scanner(System.in);
- public static void main(String[] args) {
- int i = -1;
- int num = 0;
- int x = 0;
- System.out.println("enter a fu'uin number");
- while (i == -1) {
- x = r1.nextInt();
- num = x;
- if (x <= 0) {
- System.out.println("try again you fucktard");
- } else {
- i = 0;
- }
- }
- int sum = 0;
- while (x > 0) {
- sum += x % 10;
- x /= 10;
- }
- System.out.println(sum);
- for (int e = 1; e < num; e++) {
- int sum1 = 0;
- int a = e;
- while (a > 0) {
- sum1 += a % 10;
- a /= 10;
- }
- if (sum1 == sum) {
- System.out.println(e);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement