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

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

Display program title

Accept first, second, third

If first >second and first >third Then Larges = first

If second >first and second >third Then Largest =second

If third >first and third >second Then Largest =third

Display largest

End

‫مثال لحساب صافي المصاريف الدراسية لطالب والتي تعتمد علي المواد التي يدرسها‬

‫ مواد‬١٠ ‫ جنية واذا زادت عن‬٢٥٠٠ ‫ مواد كانت المصاريف‬١٠ ‫بحيث اذا قلت عن‬

      . ١٠ ‫ جنية عن كل مادة زيادة عن‬١٠٠ ‫ باﻻضافة الي‬٢٥٠٠ ‫كانت المصاريف‬

Display program title.

Accept studentname, units

If units <=10 Then

      Tuition =2500

Else

      Tuition = 2500+(units –10)*100

End if

Display student name, tuition

End

                                                         ١٥
   10   11   12   13   14   15   16   17   18   19   20