// www.gammal.tech #include <stdio.h> int isPal (int x){ -int y = x,z=0; -while( y ){ --z = z*10 + y%10 ; --y/=10; -} -return x==z; } int main () { -int x, n = 0; -while( scanf("%d",&x) && x!=-1 ) --if( isPal(x) ) ---n++; -printf("%d\n",n); }
ال practice بيبقى افضل انك تحاول انت تعمل برامج من وحى خيالك بدل ما تاخد exercise و تروح تنفذه .
بس ف انت عارف مجموعة أوامر اعمل بيها من 5 : 10 برامج و حاول تخلى البرامج فيها اضافات كتيرة او بتعمل مهمات كثيرة قد ما تقدر .
الأوامر و المهارات اللى درسناها حتى الآن :
printf , scanf , int , char , if , for , while , do while , switch , arrays , functions , binary , octal , hexadecimal , 2d arrays , global variables , ASCII , strings , string header file , arrays of strings , struct , array of structs , Pointers , Bitwise Operator AND , Bitwise Operator OR , Bitwise Operator XOR , Bitwise Operator LEFT SHIFT , Bitwise Operator RIGHT SHIFT , Bitwise Operator NOT , Const , Enum , Math.h , Typedef , Define , Boolean , Terinary Operator , Write in File , Read from File , Read Line , Copy File
حاول تستخدمها كلها و تعمل برامج مختلفة بتعمل وظايف كتير .. انت فيما بعد لما تشوف كود او تيجى تكتب كود هيبقى الكود كبير و فيه حاجات كتير شغالة مع بعض ف لازم تتعود على كدة و تجرب تكتب بنفسك كود كبير شوية و فيه تفاصيل كتير
The commands and skills we have studied so far:
printf , scanf , int , char , if , for , while , do while , switch , arrays , functions , binary , octal , hexadecimal , 2d arrays , global variables , ASCII , strings , string header file , arrays of strings , struct , array of structs , Pointers , Bitwise Operator AND , Bitwise Operator OR , Bitwise Operator XOR , Bitwise Operator LEFT SHIFT , Bitwise Operator RIGHT SHIFT , Bitwise Operator NOT , Const , Enum , Math.h , Typedef , Define , Boolean , Terinary Operator , Write in File , Read from File , Read Line , Copy File
Try to use them all and do different programs with many functions, later when you deal with the codes you will find the code big and with many orders working at the same time it is important to get used to this and try to write prang with many details