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
١٥