Algorithm to display "n" natural numbers #c

/* Algorithm For print "n" numbers */

1. Read the value of n.
2. i = 1
3. if ( i > n ) go to step 7
4. Display value of i
5. i = i + 1
6. go to step 3
7. Stop

/* Algorithm For print "n even" numbers */


1. Read the value of n.
2. i = 2
3. if ( i > n ) go to step 7

4. Display value of i
5. i = i +2
6. go to step 3
7. Stop

/* Algorithm For print "n odd" numbers */


1. Read the value of n.
2. i = 1
3. if ( i > n ) go to step 7

4. Display value of  i
5. i = (2n - 1)
6. go to step 3
7. Stop

Comments

  1. not so useful it should be more clear

    ReplyDelete
  2. odd no. programme is not right

    ReplyDelete
  3. It's harder to understand please put in easily understood manner

    ReplyDelete
  4. odd no. program is incorrect.. ( if n=3 it only print 1 1 1 )

    even no. program doesn't print n even no.s .. its only print upto n number... (if n=4 only print 2 4 and doesn't print 2 4 6 8)

    ReplyDelete
  5. Unit converter plus APK is a simple and fast tool for converting various types of units to the Android operating system. You should know from the beginning that this app will get the best reward in the area of ​​device conversion applications in the Google Play market.
    Fonepaw Android Data Recovery Crack
    Any Video Converter Ultimate Crack
    IDM Crack

    ReplyDelete
  6. Autodesk Inventor 2021 Crack Professional is a computer support design software. The main purpose of this program is to create 3D mechanical projects.
    Wondershare Filmora Crack
    IDM Crack Serial Key
    Ant Download Manager Crack

    ReplyDelete
  7. I am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me
    https://vstcyberpc.com/plugin-alliance-bundle-crack/
    https://vstcyberpc.com/avg-pc-tuneup-crack/
    http://vstcyberpc.com/macdrive-pro-crack/
    https://vstcyberpc.com/avocode-crack/

    ReplyDelete


  8. Pretty great post. I simply stumbled upon your blog and wanted to mention that I have really loved surfing around your blog posts. Great set of tips from the master himself. Excellent ideas. Thanks for Awesome tips Keep it
    speedify-crack
    progecad-professional-crack
    lrtimelapse-pro-crack

    ReplyDelete


  9. So nice I am enjoying for that post as for u latest version of this Security tool Available
    lrtimelapse-pro-crack

    ReplyDelete


  10. Great set of tips from the master himself. Excellent ideas. Thanks for Awesome tips Keep it up
    lrtimelapse-pro-Free Download

    ReplyDelete
  11. Wow, amazing block structure! How long
    Have you written a blog before? Working on a blog seems easy.
    The overview of your website is pretty good, not to mention what it does.
    In the content!
    vstpatch.net
    Camtasia Studio Crack
    Plugin Boutique Scaler Crack
    Plugin Alliance Complete Crack
    Little Alterboy Crack
    Spectrasonics Keyscape Crack

    ReplyDelete
  12. I like your all post. You have done really good work. Thank you for the information you provide, it helped me a lot. I hope to have many more entries or so from you.
    Very interesting blog.https://vstmania.net/
    cracxfree.com Crack
    Product Key Explorer Crack
    Explaindio Video Creator Crack
    iTop VPN Crack

    ReplyDelete

Post a Comment

Popular posts from this blog

Algorithm to display the sum of n natural numbers #c

Algorithm for Sum of two numbers