Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. int number1,number2,ONEahadotfirst,ONEahadotsecond,ONEalafimfirst,ONEalafimsecond,TWOmeotfirst,TWOmeotsecond,TWOasarotfirst,TWOasarotsecond;
  2. System.out.println("הכנס מספר בעל 4 ספרות");
  3. number1=input.nextInt();
  4. System.out.println("הכנס מספר בעל 4 ספרות");
  5. number2=input.nextInt();
  6. ONEahadotfirst = number1%10;
  7. ONEahadotsecond = number2%10;
  8. ONEalafimfirst = number1/1000;
  9. ONEalafimsecond = number2/1000;
  10. TWOmeotfirst = number1%1000/100;
  11. TWOmeotsecond = number2%1000/100;
  12. TWOasarotfirst = number1/10%10;
  13. TWOasarotsecond = number2/10%10;
  14. System.out.println("המספר שבנוי מהספרות החיצוניות הוא"+ ONEahadotfirst + ONEahadotsecond+ ONEalafimfirst + ONEalafimsecond );
  15. System.out.println(" המספר שבנוי מספרות פנימיות הוא" +TWOmeotfirst+ TWOmeotsecond+ TWOasarotfirst+ TWOasarotsecond);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement