Algorithm

Algorithm-

An algorithm is a logical step-by-step method to solve a problem. Algorithm is a logic development tool. Algorithm includes calculation, data processing and reasoning processes. Three reasons for using algorithms are efficiency, abstraction and re-usability.

เคเค• เค…เคฒ्เค—ोเคฐिเคฅเคฎ เค•िเคธी เคธเคฎเคธ्เคฏा เค•ो เคนเคฒ เค•เคฐเคจे เค•े เคฒिเค เคฒिเค–े เค—เค เค•्เคฐเคฎเคฌเคฆ्เคง เคตाเค•्เคฏों เค•ा เคธเคฎूเคน เคนोเคคी เคนै। เคฏเคน เคเค• เคฒॉเคœिเค• เคกेเคตเคฒเคชเคฎेंเคŸ เคŸूเคฒ เคนै เคœिเคธเคฎे เค•ैเคฒเค•ुเคฒेเคถเคจ, เคกाเคŸा เคช्เคฐोเคธेเคธिंเค— เคเคตं เคฐीเคœเคจिंเค— เคช्เคฐोเคธेเคธ เค•ो เคฐเค–ा เคœाเคคा เคนै। เค‡เคธे เคช्เคฐเคฏुเค•्เคค เค•เคฐเคจे เค•े เคคीเคจ เคฎเคนเคค्เคตเคชूเคฐ्เคฃ เค•ाเคฐเคฃ เคนै เคตिเคถ्เคตเคธเคจीเคฏเคคा, เคธाเคฐเค—เคฐ्เคญिเคค เคเคตं เคชुเคจः เค‰เคชเคฏोเค—ीเคคा ।    

Characteristics of a good algorithm-
1.) An algorithm must contains a finite number of steps.
2.) Each step of an algorithm must be precisely defined.
3.) An algorithm should take zero or more inputs.
4.) An algorithm should give one or more outputs
5.) One or more statements should not be repeated infinitely.
6.) Order of statements must not be changed in algorithm.
7.) An Algorithm must finish after optimum time interval.

เคเค• เค…เคš्เค›ी เค…เคฒ्เค—ोเคฐिเคฅเคฎ เค•ी เคตिเคถेเคทเคคाเค-
1.) เคเค• เค…เคฒ्เค—ोเคฐिเคฅเคฎ เคฎें เคตाเค•्เคฏों เค•ी เคธंเค–्เคฏा เคชเคฐिเคฎिเคค(เคธीเคฎिเคค ) เคนोเคจी เคšाเคนिเค । 
2.) เคช्เคฐเคค्เคฏेเค• เคตाเค•्เคฏ เค•ो เคชूเคฐ्เคฃเคค: เคชเคฐिเคญाเคทिเคค เค•िเคฏा เคœाเคจा เคšाเคนिเค। 
3.) เค…เคฒ्เค—ोเคฐिเคฅเคฎ เคฆ्เคตाเคฐा เคถूเคจ्เคฏ เคฏा เค…เคงिเค• เค‡เคจเคชुเคŸ เคฒिเค เคœाเคจे เคšाเคนिเค। 
4.) เค…เคฒ्เค—ोเคฐिเคฅเคฎ เคฆ्เคตाเคฐा เคเค•  เคฏा เค…เคงिเค• เค†เค‰เคŸเคชुเคŸ เคฆिเค เคœाเคจे เคšाเคนिเค। 
5.) เคเค• เคตाเค•्เคฏ เค•ी เคชुเคจเคฐाเคตृเคค्เคคि เคจเคนीं เคนोเคจा เคšाเคนिเค। 
6.) เคตाเค•्เคฏों เค•े เค•्เคฐเคฎ เคฎें เคชเคฐिเคตเคฐ्เคคเคจ เคจเคนीं เค•िเคฏा เคœाเคจा เคšाเคนिเค।
7.) เค…เคฒ्เค—ोเคฐिเคฅเคฎ เคเค• เคจिเคถ्เคšिเคค เคธเคฎเคฏाเคตเคงि เค•े เคชเคถ्เคšाเคค् เคธเคฎाเคช्เคค เคนो เค…เคœाเคจी เคšाเคนिเค।

Example-

Algorithm for Simple Interest:-
1.) start
2.) take input principle (p), rate (r), time (t)
3.) calculate simple interest si=p*r*t/100
4.) print si
5.) stop

Algorithm for finding greatest among three numbers :-
1) start
2) Input a, b, c
3) is (a>b) No goto 7
4) is ( a>c) No goto 6
5) print a is greatest goto 10
6) print c is greatest goto 10
7) is (b>c) No goto 9
8) print b is greatest goto 10
9) print c is greatest
10) stop

Comments

Popular posts from this blog

C Language Topics in Hindi and English

Top High-Paying Tech Skills to Learn in 2025

C language IMP Questions for BSc/BA/BCom/BCA/BE/BTech/MSc/MCA (CS/IT) I year students