Topic-2: Algorithm

Step by step process to solve a particular problem  is call algorithm .

Example -1 : Add 3 numbers and print the result .

Solution : Step-1 : Value Of a,b,c 

                   Step-2: Add= a+b+c

                  Step-3: Print Add

                  Step-4: Stop

Example -2 : Input 6 subject mark of a student and find out the total mark and average mark .

Solution : Step-1 : Read Chem,Phy,Math,IT,Bio,Eng 

                   Step-2: Total mark=Chem+phy+Math+IT+Bio+Eng

                  Step-3: Avg Mark=Total mark/6

                  Step-4: Total mark is Total mark 

                  Step-5: Avg mark is Average mark

                  Step-6: Stop

Note:

Here we mention some quetsion for your practice .

Q1- Find out area of a rectangle.

Q2- Find out greatest number among 2 number .

Q3- find out area of a triangle .

Leave a Comment

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