|
![]() |
# 1 |
הנהלת הפורום לשעבר
|
בניתי לך בדרך ה"מסורתית" שמלמדים:
קוד:
public class Hosts { public static int tryThis(int num,int x){ boolean is=false; int t=num; while(t>0 && !is){ if(t%10==x) is=true; t/=10; } if(!is) num=num*10+x; return num; } public static void main(String[] args){ System.out.println(tryThis(12345,5)); System.out.println(tryThis(12345,6)); } } |
![]() |
![]() |
# 2 |
חבר חדש
|
תודה רבה לשניכם
![]() אפשר לנעול.
__________________
בברכה, אלן מילשטיין. יצירת קשר: איסיקיו - 267033249 . מסנג'ר - Elen93@Walla.Com . |
![]() |
![]() |
חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים) | |
|
|