البرمجة بالعراقي
Open in Telegram
هاي قناة سوينها ل طلاب علوم الحاسوب حتى نتعاون بيناتنا ونتعلم كل ما يتعلق بالبرمجة وايضا كلشي من ادوات ذكاء اصطناعي و مشاريع و بوتات رابط كروب مجموعة https://t.me/learn_javaaa
Show more833
Subscribers
No data24 hours
-57 days
-1330 days
Posts Archive
هنا الشرط
if(i%3==0&&a.length()>=3)
طلبت منه يكون اقل شي عدد ٣ اصفار
الحل هنا اقصر
طريقة الخ اقصر ما يمكن:
String a="000000";
int i=0;
while(i=3)
System.out.println("accpat");
else
System.out.println("not accpat");
String a="000000";
int i=0;
if(a.charAt(i)=='0'){
i++;
if(a.charAt(i)=='0'){
i++;}
if(a.charAt(i)=='0'){
i++;}
while(i
سؤال 4 ما واضح بس حسب كلام الطلاب
يريد عدد الاصفار يكون مضاعفات رقم 3
000
000 000
000 000 000
String a="002211";
int i=0;
if(a.charAt(i)=='0'){
i++;
if(a.charAt(i)=='0'){
i++;
}
while(a.charAt(i)=='2'){
i++;
}
if(a.charAt(i)=='1'){
i++;
}
if(a.charAt(i)=='1'){
i++;
}
}
if(i==a.length())
System.out.println("accpat");
else
System.out.println("not accpat");
بس ملاحظه
int j;
for ( j = 0; j < 5; j++) {
}
System.out.println(j);
بهذا الشكل البعض يتصور الj تساوي 4 لان الشرط اقل من 5
جربها وشوف راح يكون الناتج الطباعه 5
صح الشرط يتوقف بس index يزداد اخر خطوه
الشرط يوقف ما في داخل الfor فقط
String a="$AA$";
int i=0;
if(a.charAt(i)=='$'){
i++;
while(Character.isLetter(a.charAt(i))){
i++;
}
if(a.charAt(i)=='$'){
i++;
}
}
if(i==a.length())
System.out.println("accpat");
else
System.out.println("not accpat");
