ALGORITHM
At the core of programming are algorithms that determine the flow of work and the paths to be followed . Just as a work is planned before it begins to be done , a work plan must be set before it begins/switches to coding . The software reads and processes the code written in this plan in a specific order . Hence the algorithm should be set up very well . Established algorithms gain visual richness with flow diagrams .
.After reading this article :
1) to learn to build algorithm
2) you will be able to obtain the algorithms visually with Flow Diagrams .
What Is The Algorithm ?
It is the working logic that shows which paths a program will follow . The algorithm is not a programming language . It is a set of methods that guide programming languages . The algorithm for encoding in each language is implemented / implemented . For example, when you start a game that we see the main screen after the game to come is an algorithm job .

When writing an algorithm , the resources, controls, or operations used to run the application must be explicitly stated . In addition, a fully supported algorithm must check all the possibilities and determine what to do in undesirable situations .


!!! [COLOR="DarkOrchid"!!! For example, in a student application, the student scores algorithm is subtracted . Once the student is selected, the user is asked to select schools worth the score . When writing the application, it is considered that this value will be of the int data type ; the score of the school the user enters must be checked before it is assigned to the variable . If a value is entered that the int data type will not hold ( i.e. a school is selected where the student's score is not sufficient ), the application stops unexpectedly or produces unintended results at the time of study . In addition , the error of the system affects the image of the application in a bad way for the content of a message that the user cannot understand .[/COLOR]

Data Entry

Often at run time , an outside information must be entered to complete the operation. The data that the algorithm needs to work can be retrieved from the person who initiated the process or from a specified source . The process will not continue until this information is provided ..

Decisions

Decision and control structures are the most important concepts that guide the flow of the algorithm . The data entered or obtained as a result of the transaction is controlled according to the purpose of the transaction and the algorithm flow is directed to the desired ******** according to the result ..

[B]Operations/B]

Operations such as changes on data , new value assignments are needed throughout the flow of the algorithm . While the algorithms are being set up, simple writing of the operations increases readability .
Algorithms work in step order and continue to work with the next step , unless they are directed to a different ******** as a result of decision structures . .


let's do one example: wire money from an ATM [CENTER]1-Go To Your Bank's ATM



2-Get Your Credit Card



3-Look how many are in line



4-if the number of people is more than 2, return to 3

5-line up if the number of people is less than 2

6-switch to ATM if there is no queue


7-Take Out Your Credit Card

8-find the option ?Send money? or ?transfer money? immediately after entering the customer menu with the card.

9-then, find the? bank account " option and fill in the necessary information and required information. Probably your account number or IBAN and, of course, T.C. ID number will be requested.


10-it is possible to make a transfer from your account by confirming the transaction afterwards.


In order for this algorithm to work , every probability ( in my example , it may not be every probability ) is reviewed and the algorithm flow is directed to the required ********s . For example, the pass to no ATM command must be given the necessary commands to switch to the ATM . The data needed by this algorithm is either given by the user or determined before the operation begins . Data such as number of people in the queue , atm card are provided by the user ; the person to whom you will make the transfer is pre-determined .

Flow Diagram
Article-by-Article algorithms are easy to read, but it is often impossible to see the whole of the operation . Flow diagrams allow to show algorithms in visual form , thus making them more comprehensible . Various symbols are used according to the types of operations to be performed in the algorithm ..

Start-To-Finish

It is the symbol of the algorithm that shows which stage it will start and when it will finish . In the flow diagram representing an algorithm , there must be one start and one end symbol .


Data Entry

Keeps the names of data received from the user or another source .




Decision-Making

It is the symbol that specifies the decision structure . The condition expression is specified above.


Data Base

Indicates reading and writing in the database .



Screen

Specifies that the text written on it will appear on the screen as information.



Printer

Specifies that the paper written on it is removed from the printer .



Process

A symbol that indicates that an operation will be performed. Using a separate function symbol for each operation makes the flow diagram more understandable .



Function

Operations that cannot be written to the operation symbol are indicated by this symbol as child operations . .

APPLICATION
[B]Calculating University Education Grade/B]

The success grade of a course at the university is usually calculated with a midterm and a final grade . The coefficient of the visa grade is lower than the final . If the result is 50 or higher, the student passes, and if 50 is lower, the student remains . This example shows the calculation of the success score, which is weighted by 30% of the visa and 70% of the final, with the flow diagram .

[/QUOTE]

1. The number of the student whose grade will be calculated is taken from the user .
2. The student's midterm and final grades are drawn from the database .
3. If the final grade is 28 or lower, the student remains and is 9. you go to the stage . In this case , even if the visa note is 100, the resulting collected note is under 50 . Therefore, it is certain that the student stays . Making such a check prevents unnecessary operations .
4. The visa variable is assigned 30% of the visa grade from the database .
5. The final variable is assigned 70% of the visa grade from the database .
6. The result variable is assigned the sum of the final and visa values .
7. Check whether the result value is greater than 50 .
8. If the result is greater than 50, a message saying "You have passed" will be displayed on the screen . The algorithm shuts down .
9. If the result is less than 50, a message saying "You Are Left" will be displayed on the screen .


Source: https://www.turkhackteam.org/algorit...k3yl0ck3r.html
Translator: @theblackestday