Advertisement
GameNCode

Daniel Shit

Feb 8th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. /**
  2. * Created by User on 2/8/2017.
  3. * I eat tons of dick everyday, my dickshake brings all the hoes to the yard bitch
  4. */
  5.  
  6. import java.util.*;
  7.  
  8. public class WEIlon {
  9.  
  10. public static Scanner r1 = new Scanner(System.in);
  11.  
  12. public static void main(String[] args) {
  13. int i = -1;
  14. int num = 0;
  15. int x = 0;
  16. System.out.println("enter a fu'uin number");
  17. while (i == -1) {
  18. x = r1.nextInt();
  19. num = x;
  20. if (x <= 0) {
  21. System.out.println("try again you fucktard");
  22. } else {
  23. i = 0;
  24. }
  25. }
  26. int sum = 0;
  27. while (x > 0) {
  28. sum += x % 10;
  29. x /= 10;
  30. }
  31. System.out.println(sum);
  32.  
  33.  
  34. for (int e = 1; e < num; e++) {
  35. int sum1 = 0;
  36. int a = e;
  37. while (a > 0) {
  38. sum1 += a % 10;
  39. a /= 10;
  40. }
  41. if (sum1 == sum) {
  42. System.out.println(e);
  43. }
  44. }
  45. }
  46.  
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement