انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية الهندسة
القسم الهندسة المدنية
المرحلة 1
أستاذ المادة منى حاتم جابر الحربي
13/07/2018 13:10:45
1- Algorithms Algorithms : The term algorithm originally referred to any computation performed via a set of rules applied to numbers written in decimal form. The word is derived from the phonetic pronunciation of the last name of Abu Ja far Mohammed ibn Musa al-Khowarizmi, who was an Arabic mathematician who invented a set of rules for performing the four basic arithmetic operations (addition, subtraction, multiplication and division) on decimal numbers. Thus An algorithm is a representation of a solution to a problem. Definition: An algorithm is procedure consisting of a finite set of simple rules which specify a finite sequence of operations that provides the solution to a problem, or to a specific class of problems for any allowable set of input quantities. In other word, an algorithm is a step-by-step procedure to solve a given problem. Example 1: write the algorithm to find the results of this equation : S = A+B+C+D Solution : 1- Start 2- Read A,B,C,D 3- Calculate S =A+B+C+D 4- Print the value of S 5- End.
Example 2: Write an algorithm to determine a student’s final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks. Solution : 1- Start 2- I= I+1 3- Input M 4- S=S+M 5- If I< 4 go to the step 2 6- Av = S / 4 7- If Av below 50 print “pass” , else , print “fail”. 8- End.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم
|