MCS-011 Problem Solving and Programming: Part-1- Introduction To Algorithm

Algorithm

An algorithm is a finite set of steps defining the solution of a particular problem. It is expressed in pseudo code, but with some statements in English rather than in the Programming Language.
As we know there are many ways to solve a problem, programmers seek to create the most effective algorithms possible. By using highly-efficient algorithms, developers can ensure their programs run as fast as possible and use minimum system resources.

Example 1

Lets try to develop an algorithm to compute and display the sum of two numbers:
  1. START
  2. Read two numbers a and b.
  3. Calculate the sum of a and b and store it in sum.
  4. Display the value of sum.
  5. STOP

Example 2

Algorithm to calculate the Factorial of a given number:
  1. START
  2. Read the number n.
  3. [Initialization] i <- 1, fact <- 1
  4. Repeat steps 4 through 6 until i = n;
  5. fact <- fact * i
  6. i <- i * 1
  7. Print fact
This is all for this Blog, we will learn more about Algorithms in the coming blogs. Keep visiting my blog. Thanks

SOURCE :- TYUTS.IN

  

Comments

  1. Hey Guys thanks for supporting me Please read my new blogs at my new website
    https://tyuts.in

    ReplyDelete
  2. Nyc information.
    Easily understandable.
    I too have written a blog.
    Here is the link...
    http://tyuts.in/category/eco-01/

    ReplyDelete
  3. Bet365 Apk Download & Installation - legalbet.co.kr
    Bet365 Apk download for Android, deccasino iOS and Android is 바카라 사이트 licensed in a lot of other states to provide online sports betting, but they still need some help and 1xbet korean help

    ReplyDelete
  4. Casinos - Bingo, Poker, Slots, Dice, - CBS News
    Casino and Slots are 마이크로 게이밍 what 바카라작업 you need. Choose the 먹튀재판소 best site for pci e 슬롯 slots, poker, and slots. Whether you're 벳 365 우회 in the mood for more Vegas-style games or just enjoying

    ReplyDelete

Post a Comment

Popular posts from this blog

Ignou BCA Solved Assignments