Algorithm

Planning a program involves defining its logic (the correct sequence of instructions needed to solve the problem at hand) called Algorithm. It is a step-by – step description of how to arrive at a solution to a given problem.

Algorithm – Number Calculation

1. Write an algorithm for input two number and calculate them.

Step-1 Start

Step-2 Input two number into A, B

Step-3 C=A+B

Step-4 Display C

Step-5 Stop

2. Write an algorithm for show the result of (A+B)/C, (A+B)*(B-C).

Step-1 Start

Step-2 Input three number into A,B,C

Step-3 D=(A+B)/C

Step-4 E=(A+B)*(B-C)

Step-5 Display D,E

Step-6 Stop

Algorithm – Highest & Lowest Value

3. Write an algorithm for input three number and show the highest, lowest value.

Step-1 Start

Step-2 Input three number into A,B,C

Step-3 M=MAX(A,B,C)

Step-4 N=MIN(A,B,C)

Step-5 Display M,N

Step-6 Stop

Algorithm – Temperature Converter

4. Write an algorithm for input temperature number in Celsius, Fahrenheit and convert to opposite temperature number.

Step-1 Start

Step-2 Input temperature number in Celsius, Fahrenheit into C, F

Step-3 CF=9*C/5+32

Step-4 CC=(5*F-160)/9

Step-5 Display CF, CC

Step-6 Stop

Algorithm – Marksheet

5. Write an algorithm for input Student Name, Six Subject number and calculate best of five Total, Average, Grade.

*Note:

Grade “A+” for Average>=90

Grade “A” for Average>=80

Grade “B+” for Average>=70

Grade “B” for Average>=60

Grade “C” for Average>=50

Grade “D” for Average>=40

Otherwise Grade “Fail”

Step-1 Start

Step-2 Input Student Name, Six Subject number into N, B, E, G, H, M, C

Step-3 L=MIN(G,H,M,C)

Step-4 T=(B+E+G+H+M+C)-L

Step-5 A=T/5

Step-6 If A>=90 Then D=”A+” Goto Step-13

Step-7 Elseif A>=80 Then D=”A” Goto Step-13

Step-8 Elseif A>=70 Then D=”B+” Goto Step-13

Step-9 Elseif A>=60 Then D=”B” Goto Step-13

Step-10 Elseif A>=50 Then D=”C” Goto Step-13

Step-11 Elseif A>=40 Then D=”D” Goto Step-13

Step-12 Else D=”Fail”

Step-13 Display T, A, D

Step-14 Stop

Algorithm – Serial Number

7. Write an algorithm for show 1 2 3..ten natural number.

Step-1 Start

Step-2 A=1, K=1

Step-3 Display A

Step-4 A=A+1

Step-5 K=K+1

Step-6 If K<=10 Then goto Step-3

Step-7 Stop

Algorithm – Ten *

8. Write an algorithm for show ten *.

Step-1 Start

Step-2 A=1, K=1

Step-3 Display “*”

Step-4 A=A+1

Step-5 K=K+1

Step-6 If K<=10 Then goto Step-3

Step-7 Stop

Algorithm – 1 3 5 7..upto 10 Number

9. Write an algorithm for show 1 3 5 7..upto 10 number.

Step-1 Start

Step-2 A=1, K=1

Step-3 Display A

Step-4 A=A+2

Step-5 K=K+1

Step-6 If K<=10 Then goto Step-3

Step-7 Stop

Algorithm – 5 9 13 17..upto 10 Number

10. Write an algorithm for show 5 9 13 17..upto 10 number.

Step-1 Start

Step-2 A=5, K=1

Step-3 Display A

Step-4 A=A+4

Step-5 K=K+1

Step-6 If K<=10 Then goto Step-3

Step-7 Stop

Algorithm – 1 8 27 64..upto 10 Number

11. Write an algorithm for show 1 8 27 64..upto 10 number.

Step-1 Start

Step-2 A=1, K=1

Step-3 Display A*A*A

Step-4 A=A+1

Step-5 K=K+1

Step-6 If K<=10 Then goto Step-3

Step-7 Stop

Algorithm – 5 9 14 20..upto 10 Number

12. Write an algorithm for show 5 9 14 20..upto 10 number.

Step-1 Start

Step-2 A=5, B=4, K=1

Step-3 Display A

Step-4 A=A+B

Step-5 B=B+1

Step-6 K=K+1

Step-7 If K<=10 Then goto Step-3

Step-8 Stop

Algorithm – A B C D..upto 26 Character

13. Write an algorithm for show A B C D..upto 26 character.

Step-1 Start

Step-2 A=65, K=1

Step-3 Display CHR(A)

Step-4 A=A+1

Step-5 K=K+1

Step-6 If K<=26 Then goto Step-3

Step-7 Stop

Algorithm – Name Pyramid Structure

14. Write an algorithm for input “JYCTC” and show in Pyramid Structure.

J

JY

JYC

JYCT

JYCTC

Step-1 Start

Step-2 J=”JYCTC”, K=1

Step-3 L=LEN(J)

Step-4 Display LEFT(J,K)

Step-5 K=K+1

Step-6 If K<=L Then goto Step-4

Step-7 Stop

15. Write an algorithm for input “JYCTC” and show in Pyramid Structure.

JYCTC

JYCT

JYC

JY

J

Step-1 Start

Step-2 J=”JYCTC”, K=1

Step-3 L=LEN(J)

Step-4 N=L

Step-5 Display LEFT(J,N)

Step-6 N=N-1

Step-7 K=K+1

Step-8 If K<=L Then goto Step-5

Step-9 Stop

16. Write an algorithm for input “JYCTC” and show in Pyramid Structure.

J

JY

JYC

JYCT

JYCTC

JYCT

JYC

JY

J

Step-1 Start

Step-2 J=”JYCTC”, K=1, M=1

Step-3 L=LEN(J)

Step-4 Display LEFT(J,K)

Step-5 K=K+1

Step-6 If K<=L Then goto Step-4

Step-7 N=L-1

Step-8 P=N

Step-9 Display LEFT(J,P)

Step-10 P=P-1

Step-11 M=M+1

Step-12 If M<=N Then goto Step-9

Step-13 Stop

Algorithm – Opposite Character

17. Write an algorithm for input “COMPUTER” and show it as “RETUPMOC” (Opposite Character).

Step-1 Start

Step-2 Z=””, C=”COMPUTER”, K=1

Step-3 L=LEN(C)

Step-4 N=SUBSTR(C,L,1)

Step-5 Z=Z+N

Step-6 L=L-1

Step-7 K=K+1

Step-8 If K<=L Then goto Step-4

Step-9 Display Z

Step-10 Stop

13 Replies to “Algorithm”

  1. I would like to show my appreciation to this writer for bailing me out of this challenge. After exploring through the search engines and getting techniques which are not powerful, I assumed my entire life was over. Being alive minus the strategies to the problems you’ve sorted out through your good report is a crucial case, as well as those which may have in a negative way affected my career if I hadn’t noticed the blog. Your main understanding and kindness in taking care of every part was invaluable. I don’t know what I would’ve done if I hadn’t discovered such a stuff like this. I can also at this moment look ahead to my future. Thank you so much for your specialized and sensible help. I won’t hesitate to refer your blog to anybody who desires guide on this issue.

  2. I actually wanted to post a simple note so as to appreciate you for these wonderful ways you are showing at this website. My extended internet search has now been compensated with really good points to write about with my family and friends. I ‘d state that that most of us visitors are undeniably blessed to dwell in a fantastic website with so many brilliant professionals with beneficial pointers. I feel rather privileged to have come across the website page and look forward to really more amazing minutes reading here. Thanks a lot once more for all the details.

  3. I precisely desired to thank you so much again. I am not sure the things that I might have achieved in the absence of the smart ideas revealed by you about my question. It previously was the frustrating condition for me personally, however , taking a look at your professional approach you resolved it forced me to leap for fulfillment. I’m just thankful for the guidance and as well , expect you find out what a powerful job your are providing teaching some other people via your webblog. I am certain you’ve never met any of us.

  4. I wanted to write a quick remark to be able to appreciate you for all of the stunning pointers you are posting at this site. My extensive internet search has finally been recognized with extremely good details to talk about with my friends and classmates. I would suppose that most of us website visitors actually are rather fortunate to exist in a wonderful community with so many special professionals with useful secrets. I feel rather lucky to have come across your entire site and look forward to so many more excellent times reading here. Thanks a lot once again for everything.

  5. I wanted to write a brief comment to be able to appreciate you for those splendid recommendations you are giving at this site. My rather long internet lookup has at the end of the day been honored with good know-how to write about with my co-workers. I would declare that many of us visitors are truly endowed to exist in a remarkable website with so many brilliant people with great guidelines. I feel pretty grateful to have used your weblog and look forward to so many more amazing minutes reading here. Thanks a lot again for everything.

  6. I enjoy you because of all of the efforts on this website. Gloria delights in making time for research and it is easy to understand why. All of us notice all regarding the dynamic means you make vital information on your website and in addition boost response from other people on this article plus our own girl is being taught a great deal. Take advantage of the rest of the new year. You’re performing a pretty cool job.

  7. I together with my guys were actually examining the great recommendations from the website and then all of a sudden I had an awful suspicion I never thanked the website owner for those tips. These guys are already totally passionate to learn them and have now unquestionably been making the most of those things. I appreciate you for truly being considerably accommodating and also for considering these kinds of very good themes millions of individuals are really eager to discover. Our own sincere apologies for not expressing gratitude to you sooner.

  8. I wanted to draft you the very little remark to give many thanks as before for your extraordinary things you have shown above. It has been really extremely generous with you to supply openly all a lot of folks could have supplied as an ebook to help make some bucks for their own end, specifically seeing that you might well have tried it if you decided. These good tips additionally worked like a easy way to fully grasp other people have the same interest the same as my personal own to realize more and more around this problem. I am certain there are numerous more pleasant instances up front for many who looked at your site.

  9. I actually wanted to post a brief message in order to express gratitude to you for all of the stunning tricks you are posting at this website. My time consuming internet research has at the end been rewarded with professional suggestions to write about with my company. I ‘d express that most of us readers actually are truly lucky to exist in a decent site with so many brilliant professionals with useful points. I feel somewhat lucky to have discovered your weblog and look forward to plenty of more awesome moments reading here. Thank you again for a lot of things.

  10. Hello, i believe that i noticed you visited my website thus i came to “go back the favor”.I’m trying to find things to enhance my website!I assume its good enough to make use of some of your concepts!!

Leave a Reply

Your email address will not be published. Required fields are marked *