Page 17 - أساسيات الحاسب الالي2
P. 17

‫مقدمة فى البرمجة‬                             ‫الفصل اﻷول‬

      currentday = current day +30

      Days = currentdays – birthdays

End if

If current month > birthmonth then

      month = current month – birthmonth

Else

      Currentyear = currentyear -1

      currentmonth =currentmonth + 12

      Month = currentmonth – birthmonth

End if

If current year > birth year then

      Year = current years – birth year

      Display days , month , years

Else

      display error message

End if

End

‫مثال برن امج لح ساب قيم ة ف اتورة الم شتريات لم ستهلك وال ذي ت ساوي س عر اﻷص ناف‬

‫ من سعر اﻷصناف و ي ضاف م صاريف‬%١٠ ‫مضافاً اليه ضريبة المبيعات التي تعادل‬

١٥ ‫ جني ة وت ساوي‬١٥٠ ‫ جنيه ات اذا ق ل س عر اﻷص ناف ع ن‬١٠ ‫الشحن والتي تساوي‬

                                          . ‫جنيهاً اذا زاد عن هذا المبلغ‬

Display program title

Accept customernomber, name, quanity, price

purchaseamount = quantity * price

                                             ١٧
   12   13   14   15   16   17   18   19   20   21   22