1 / 10

برنامه نويسی پاسکال

بسم الله الرحمن الرحيم. برنامه نويسی پاسکال. شنبه 28 آبان ماه 1384. عبارتهای ریاضی. عبارتهای شامل چند نوع داده: Integer به همراه Real X := 3 * Y / 27 + 65; X := 3 * Y div 27 + 65; X := 14 div (21 / 7); نادرست عبارت شامل چند عملگر Y := a * Sqr(x) + b * x + c;

javier
Télécharger la présentation

برنامه نويسی پاسکال

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. بسم الله الرحمن الرحيم برنامه نويسی پاسکال شنبه 28 آبان ماه 1384

  2. عبارتهای ریاضی • عبارتهای شامل چند نوع داده: Integer به همراه Real X := 3 * Y / 27 + 65; X := 3 * Y div 27 + 65; X := 14 div (21 / 7); نادرست • عبارت شامل چند عملگر Y := a * Sqr(x) + b * x + c; Y := Sin(X2) – Sin(X1) / X2 – X1;

  3. عبارتهای ریاضی (ادامه) • تقدم عملگرهای ریاضی • عبارات داخل پرانتز • * / div mod از چپ به راست • - + از چپ به راست • اولویت عملگر منفی (- ) هم مانند عملگر تفریق

  4. عبارتهای ریاضی (ادامه) Y := a * Sqr(x) + b * x + c; Y := ((a * Sqr(x)) + (b * x)) + c; Y := Sin(X2) – Sin(X1) / X2 – X1; Y := (Sin(X2) – (Sin(X1) / X2)) – X1; Y := (Sin(X2) – Sin(X1)) / (X2 – X1);

  5. عبارتهای ریاضی (ادامه) N := - A div I + B div J + C + 3 * D * D; 5 1 6 2 7 8 3 4

  6. تعریف قالب نمایش I := 25; WriteLn(I:7); | 25| X := 1.55; WriteLn(X:7:2); | 1.55| WriteLn(X:7:0); | 2| WriteLn(X:0:3); |1.550|

  7. تعریف قالب نمایش S := ‘Hello’; WriteLn(S:7); | Hello| WriteLn(S:7, X:5:2); | Hello 1.55|

  8. انواع خطا های برنامه نویسی • زمان ترجمه (کامپایل) Compile Error X := A div 2.5; for i = 7 to 25 doo • زمان اجرا Runtime Error X := -30; Y := Sqrt(X) + 13;

  9. توابع ریاضی پاسکال • Abs: قدر مطلق Abs(-35) = 35 • Cos • Sin • Tan • ArcTan • Ln - ورودی تابع نا منفی باشد • Exp

  10. توابع ریاضی پاسکال (ادامه) • Round • Trunc • Frac • Random

More Related