program trig ﺎﻳﺍﻭﺰﻟﺍ ﺱﺎﻴﻗ ﻞﻳﻮﺤﺘﻟ ﻝﺎﺜﻣ real api print Enter an angle between 0

Program trig ﺎﻳﺍﻭﺰﻟﺍ ﺱﺎﻴﻗ

This preview shows page 2 - 6 out of 18 pages.

program trig ﺎﻳﺍﻭﺰﻟﺍ ﺱﺎﻴﻗ ﻞﻳﻮﺤﺘﻟ ﻝﺎﺜﻣ real :: a,pi print *,'Enter an angle between 0 and 90' read *, a pi=4.0*atan(1.0) print *,'the sine of ',a,' is ',sin(a*pi/180) end # Making decision ﺭﺍﺮﻘﻟﺍ ﺫﺎﺨﺗﺍ If statement : ﻲﻫ ﺎﻬﻟ ﺔﻣﺎﻌﻟﺍ ﺔﻐﻴﺼﻟﺍ If ( condition ) Then ﻁﺮﺸﻟﺍ ﻖﻘﺤﺗ ﺔﻟﺎﺣ ﻲﻓ ﻞﻤﺠﻟﺍ ﺔﻋﻮﻤﺠﻣ Else ﻁﺮﺸﻟﺍ ﻖﻘﺤﺗ ﻡﺪﻋ ﺔﻟﺎﺣ ﻲﻓ ﻞﻤﺠﻟﺍ ﺔﻋﻮﻤﺠﻣ Endif
Image of page 2

Subscribe to view the full document.

3 ﻲﻫ ﻁﺮﺸﻟﺍ ﻲﻓ ﺔﻣﺪﺨﺘﺴﻤﻟﺍ ﺕﺎﻗﻼﻌﻟﺍ == equal to ﺓﺍﻭﺎﺴﻤﻠﻟ /= not equal to ﻱﻭﺎﺴﻳ ﻻ < less than ﻦﻣ ﻞﻗﺍ <= less than or equal to ﻱﻭﺎﺴﻳ ﻭﺍ ﻦﻣ ﻞﻗﺍ > greater than ﻦﻣ ﺮﺒﻛﺍ >= greater than or equal to ﻱﻭﺎﺴﻳ ﻭﺍ ﻦﻣ ﺮﺒﻛﺍ Example if (y > z) then ﻁﺮﺸﻟﺍ ﻖﻘﺤﺗ ﺍﺫﺍ ﺓﺬﻔﻨﻤﻟﺍ ﻞﻤﺠﻟﺍ end if # The do loop ﻦﻣ ﺩﺪﻋ ﻞﻤﺠﻟﺍ ﻦﻣ ﺩﺪﻋ ﻭﺍ ﺔﻨﻴﻌﻣ ﺔﻠﻤﺟ ﺭﺍﺮﻜﺘﻟ ﻥﺍﺮﺗﺭﻮﻓ ﺔﻐﻟ ﺮﻓﻮﺗ ﻡﺍﺪﺨﺘﺳﺍ ﻝﻼﺧ ﻦﻣ ﺕﺍﺮﻤﻟﺍ Do .. Loop ﺔﻣﺎﻌﻟﺍ ﺔﻐﻴﺼﻟﺍ DO variable=sv,ev,step ﻥﺍ ﺚﻴﺣ Sv = start value ﻰﻟﻭﻻﺍ ﺔﻤﻴﻘﻟﺍ Ev = end value ﺓﺮﻴﺧﻻﺍ ﺔﻤﻴﻘﻟﺍ Step = ﺓﻮﻄﺧ ﻞﻛ ﺪﻌﺑ ﺓﺩﺎﻳﺰﻟﺍ ﺭﺍﺪﻘﻣ ﺔﺒﻟﺎﺳ ﻭﺍ ﺔﺒﺟﻮﻣ ﻥﻮﻜﺗ ﻥﺍ ﻦﻜﻤﻳ ﻩﻼﻋﺍ ﻢﻴﻘﻟﺍ ﻊﻴﻤﺟ ﻥﺍ ﺔﻈﺣﻼﻣ ﻊﻣ Example1 Do k = 1,10 ﺓﺭﺮﻜﻤﻟﺍ ﻞﻤﺠﻟﺍ End do ﺮﻴﻐﺘﻤﻟﺍ ﺔﻤﻴﻗ ﻥﻮﻜﺗﻭ ﺕﺍﺮﻣ ﺓﺮﺸﻋ ﻞﻤﺠﻟﺍ ﺭﺮﻜﺗ ﻩﻼﻋﺍ ﻝﺎﺜﻤﻟﺍ ﻲﻓ K (1,2,3,…..,10) ﺓﺩﺎﻳﺰﺑ ﻱﺍ ﺭﺍﺮﻜﺘﻟﺍ ﺕﺍﻮﻄﺧ ﻦﻣ ﺓﻮﻄﺧ ﻞﻛ ﻲﻓ 1 ﺓﻮﻄﺧ ﻞﻛ ﻲﻓ
Image of page 3
4 Example2 Do k = 1,10,2 ﺓﺭﺮﻜﻤﻟﺍ ﻞﻤﺠﻟﺍ End do ﺮﻴﻐﺘﻤﻟﺍ ﺔﻤﻴﻗ ﻥﻮﻜﺗﻭ ﺕﺍﺮﻣ ﺔﺴﻤﺧ ﻞﻤﺠﻟﺍ ﺭﺮﻜﺗ ﻩﻼﻋﺍ ﻝﺎﺜﻤﻟﺍ ﻲﻓ K (1,3,5,7,9) ﺓﺩﺎﻳﺰﺑ ﻱﺍ ﺭﺍﺮﻜﺘﻟﺍ ﺕﺍﻮﻄﺧ ﻦﻣ ﺓﻮﻄﺧ ﻞﻛ ﻲﻓ 2 ﺓﻮﻄﺧ ﻞﻛ ﻲﻓ Example1 Do k = -10,1,-1 ﺓﺭﺮﻜﻤﻟﺍ ﻞﻤﺠﻟﺍ End do ﺮﻴﻐﺘﻤﻟﺍ ﺔﻤﻴﻗ ﻥﻮﻜﺗﻭ ﺕﺍﺮﻣ ﺓﺮﺸﻋ ﻞﻤﺠﻟﺍ ﺭﺮﻜﺗ ﻩﻼﻋﺍ ﻝﺎﺜﻤﻟﺍ ﻲﻓ K (10,9,8,7,…..,1) ﺓﺩﺎﻳﺰﺑ ﻱﺍ ﺭﺍﺮﻜﺘﻟﺍ ﺕﺍﻮﻄﺧ ﻦﻣ ﺓﻮﻄﺧ ﻞﻛ ﻲﻓ (-1) ﺓﻮﻄﺧ ﻞﻛ ﻲﻓ # Arrays ﺕﺎﻓﻮﻔﺼﻤﻟﺍ : ﺓﺮﻛﺍﺬﻟﺍ ﻲﻓ ﺎﻳﻼﺨﻟﺍ ﻦﻣ ﻲﻟﺎﺘﺘﻣ ﺩﺪﻋ ﺰﺠﺤﻟ ﻲﻫ ﺔﺠﻣﺮﺒﻟﺍ ﻲﻓ ﺕﺎﻗﻮﻔﺼﻤﻟﺍ Examples : Real :: A(5) ﺰﺠﺤﻟ 5 ﻲﻘﻴﻘﺤﻟﺍ ﻲﻤﻗﺮﻟﺍ ﻉﻮﻨﻟﺍ ﻦﻣﺎﻳﻼﺧ ِ A(1) A(2) A(3) A(4) A(5) Integer :: B(20) ﺰﺠﺤﻟ 20 ﺢﻴﺤﺼﻟﺍ ﻲﻤﻗﺮﻟﺍ ﻉﻮﻨﻟﺍ ﻦﻣ ﺔﻴﻠﺧ
Image of page 4

Subscribe to view the full document.

5 ﻥﺍﺭﺗﺭﻭﻓ ﺔﻐﻟ ﺔﻬﺟﺍﻭ ﻰﻠﻋ ﻑﺭﻌﺗﻟﺍ 90 ( ﻊﺑﺭﻣﻟﺍ ﺔﺣﺎﺳﻣ ﺩﺎﺟﻳﺍ )
Image of page 5
Image of page 6
  • Fall '16
  • Codd, nsum, CPOs, sumn, CNEG

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes