<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7807925557414569477</id><updated>2026-06-02T12:24:04.159-07:00</updated><title type='text'>Programming in QBASIC</title><subtitle type='html'>Learn Quick Beginner&#39;s All Purpose Symbolic Instruction Code. It is dedicated to all computer students of grade 8 to grade 10 .</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-6835226634232918226</id><published>2010-06-04T06:07:00.000-07:00</published><updated>2010-06-04T07:50:50.374-07:00</updated><title type='text'>Kaun Banega Crorepati, a small executable program developed in QBASIC</title><content type='html'>Download the executible Kaun Banega Crorepati game.&lt;br /&gt;
Download Links:&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;&lt;a href=&quot;http://pkhadka548043.fileave.com/QBASIC/KBCGame.EXE&quot;&gt;&lt;strong&gt;KBC Game Executable Program&lt;/strong&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
This is small fun sort of game based on the concept of KBC, a famous tv reality show in Startplus.&lt;br /&gt;
This program is very simple but if you have really work hard then you can work on the source code of this game and make it more interesting and perfect. &lt;br /&gt;
You can work on following grounds to make this program more realistic- &lt;br /&gt;
&amp;nbsp;- integrate data file&lt;br /&gt;
&amp;nbsp;- make administrative screen for feeding questions&lt;br /&gt;
&amp;nbsp;- make question appears random&lt;br /&gt;
and more...&lt;br /&gt;
All you can with QBASIC code easily.&lt;br /&gt;
Ya you can explore your knowledge and test your creativity of programming.&lt;br /&gt;
I hope this project will provide you source of motivation of in QBASIC programming.&lt;br /&gt;
This project is very&amp;nbsp;well-suited&amp;nbsp;to the SLC candidates of Nepal.&lt;br /&gt;
&lt;br /&gt;
You can work on it.&lt;br /&gt;
So, download your free source-code of this KBC game.&lt;br /&gt;
Download Link:&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;a href=&quot;http://pkhadka548043.fileave.com/QBASIC/KBCGameSourceCode.BAS&quot;&gt;&lt;strong&gt;KBC Game&amp;nbsp;Source Code&lt;/strong&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/6835226634232918226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/06/kaun-banega-crorepati-small-executable.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6835226634232918226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6835226634232918226'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/06/kaun-banega-crorepati-small-executable.html' title='Kaun Banega Crorepati, a small executable program developed in QBASIC'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-4120434885765279545</id><published>2010-05-31T03:59:00.000-07:00</published><updated>2010-05-31T20:55:42.129-07:00</updated><title type='text'>Simple Calculator more than you expect from school teacher!!!</title><content type='html'>&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=pkhadka548043&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B000M8OX6W&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;Please click below to obtain (download) source program file.&lt;br /&gt;
Open that file is QBASIC.&lt;br /&gt;
.Download Link is:&lt;br /&gt;
&lt;a href=&quot;http://pkhadka548043.fileave.com/QBASIC/calculator.bas&quot;&gt;download calculator.bas files&lt;/a&gt;&lt;br /&gt;
This program looks like simple desktop calculator, ya you can&#39;t use mouse, though numeric keypads will work well to do calculations. See how is this calculator functions. I have made the coding as simple as possible so that you can follow the code and understand it easily.&lt;br /&gt;
If you want do more scientific calculations, you may try yourself at home. It will be fun to do programming, believe me.&lt;br /&gt;
Enjoy your programming.</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/4120434885765279545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/simple-calculator-more-than-you-expect.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/4120434885765279545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/4120434885765279545'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/simple-calculator-more-than-you-expect.html' title='Simple Calculator more than you expect from school teacher!!!'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-9138467994287980135</id><published>2010-05-06T06:53:00.000-07:00</published><updated>2010-05-06T06:53:15.985-07:00</updated><title type='text'>Procedural vs. Object-Oriented</title><content type='html'>&lt;p&gt;&lt;object style=&quot;BACKGROUND-IMAGE: url(http://i1.ytimg.com/vi/4_Oj4xcD52A/hqdefault.jpg)&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/4_Oj4xcD52A&amp;amp;hl=en_US&amp;amp;fs=1&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/4_Oj4xcD52A&amp;amp;hl=en_US&amp;amp;fs=1&quot; width=&quot;425&quot; height=&quot;344&quot; allowscriptaccess=&quot;never&quot; allowfullscreen=&quot;true&quot; wmode=&quot;transparent&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&lt;p&gt;Lets understand the basic difference between Procedural &lt;/p&gt;&lt;p&gt;Programming Paradigm and Object-Oriented Programming&lt;/p&gt;&lt;p&gt;Paradigm.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/9138467994287980135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/procedural-vs-object-oriented.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/9138467994287980135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/9138467994287980135'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/procedural-vs-object-oriented.html' title='Procedural vs. Object-Oriented'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-3444389205238602428</id><published>2010-05-06T04:20:00.000-07:00</published><updated>2010-05-06T04:20:03.688-07:00</updated><title type='text'>QBASIC MATRIX</title><content type='html'>&lt;p&gt;&lt;object style=&quot;BACKGROUND-IMAGE: url(http://i2.ytimg.com/vi/QYSegrtblSQ/hqdefault.jpg)&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/QYSegrtblSQ&amp;amp;hl=en_US&amp;amp;fs=1&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/QYSegrtblSQ&amp;amp;hl=en_US&amp;amp;fs=1&quot; width=&quot;425&quot; height=&quot;344&quot; allowscriptaccess=&quot;never&quot; allowfullscreen=&quot;true&quot; wmode=&quot;transparent&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;&lt;p&gt;This program in QBASIC simple. This program displays the&lt;/p&gt;&lt;p&gt;matrix code which is similar to shown in the movie &quot;MATRIX&quot; .&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/3444389205238602428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/qbasic-matrix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/3444389205238602428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/3444389205238602428'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/qbasic-matrix.html' title='QBASIC MATRIX'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-5548534729814422195</id><published>2010-05-06T03:54:00.000-07:00</published><updated>2010-05-06T04:14:57.287-07:00</updated><title type='text'>Lecture 1 | Programming Paradigms 1 (Stanford)</title><content type='html'>&lt;object height=&quot;344&quot; style=&quot;background-image: url(http://i1.ytimg.com/vi/Ps8jOj7diA0/hqdefault.jpg);&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/Ps8jOj7diA0&amp;amp;hl=en_US&amp;amp;fs=1&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/Ps8jOj7diA0&amp;amp;hl=en_US&amp;amp;fs=1&quot; width=&quot;425&quot; height=&quot;344&quot; allowscriptaccess=&quot;never&quot; allowfullscreen=&quot;true&quot; wmode=&quot;transparent&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
Understand Programming Paradigm</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/5548534729814422195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/lecture-1-programming-paradigms-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/5548534729814422195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/5548534729814422195'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/lecture-1-programming-paradigms-1.html' title='Lecture 1 | Programming Paradigms 1 (Stanford)'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-7897264711108071759</id><published>2010-05-01T04:07:00.000-07:00</published><updated>2010-05-01T04:24:57.229-07:00</updated><title type='text'>Introduction to Procedural Programming - Part III</title><content type='html'>&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=pkhadka548043&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=3540407960&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;In this post&amp;nbsp;I will discuss &quot;How To&quot; Procedular Programming. &lt;br /&gt;
Lets begin.&lt;br /&gt;
We know that programming is logical arrangement of statements (code) targed to obtain certain goal. Every code (statement) except to non-executable are meant to perform certain action. In procedural programming we will segment (divide) these blocks into several manageable parts (procedures/sub-program). For example, a problem of testing where a number is prime, we will write around 7-8 lines code of program; we can think this problem in procedural way- first there is need of a procedure which accepts a input number and second the number is passed&amp;nbsp; in another procedure which operates number&amp;nbsp;in testing whether number is prime and returns result&amp;nbsp;then finally there is&amp;nbsp;a need of&amp;nbsp;third procedure which will&amp;nbsp;provide the result (output) to the user.&lt;br /&gt;
Here students may find little difficult or misleading or&amp;nbsp;may think in different way. I want to aware you that how&amp;nbsp;would you segment&amp;nbsp;programs into several&amp;nbsp;procedure depends I don&#39;t say you will be wrong; ya&amp;nbsp;in the beginning it may be little confusion, but not get overloaded. Slowly with revisions and illustration programs you will finally grab the concepts and then onward it will be habitual.&lt;br /&gt;
Lets take a look on above illustration in the form of program (if you don&#39;t understand program don&#39;t get upset; only try to catch concept of procedures):&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;&lt;strong&gt;Program: testing whether number is prime (structure program- no procedures)&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
CLS&lt;br /&gt;
REM asking user to input a number to test for prime&lt;br /&gt;
INPUT &quot;Enter a testing number&quot;; n&lt;br /&gt;
REM&amp;nbsp;test whether number is prime; set flag f to&amp;nbsp;1&amp;nbsp;(we first assume that n is prime)&lt;br /&gt;
f=1&lt;br /&gt;
FOR i=2 TO n/2&lt;br /&gt;
&amp;nbsp; IF n mod i=0 THEN f=0 : EXIT FOR&lt;br /&gt;
NEXT i&lt;br /&gt;
REM check value of f to decide prime/composite and display result to the&amp;nbsp;user&lt;br /&gt;
IF f=1 THEN&lt;br /&gt;
&amp;nbsp; PRINT n;&quot; is Prime Number!&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp; PRINT n; &quot; is Composite Number!&quot;&lt;br /&gt;
ENDIF&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;em&gt;Program: testing whether number is prime (Procedural -&amp;nbsp;1 sub-routines and&amp;nbsp;2 function)&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;[Here. ACCEPT function askes testing number and returns to module (calling program)&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&amp;nbsp;ISPRIME function with a value passed through parameter returns 1 if the value is prime&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&amp;nbsp;DISPLAY sub-routine will display the result on the screen]&lt;/em&gt;&lt;br /&gt;
DECLARE FUNCTION accept()&lt;br /&gt;
DECLARE FUNCTION isPrime(num)&lt;br /&gt;
DECLARE SUB display(testnum, result)&lt;br /&gt;
CLS&lt;br /&gt;
v=accept&lt;br /&gt;
REM isPrime function is invoked then its return is passed to the display&amp;nbsp;(see more-Functional Operator)&lt;br /&gt;
CALL display(v, isPrime(v))&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
FUNCTION accept&lt;br /&gt;
INPUT &quot;Enter a testing number=&quot;; n&lt;br /&gt;
accept=n&lt;br /&gt;
END FUNCTION&lt;br /&gt;
&lt;br /&gt;
FUNCTION isPrime(num)&lt;br /&gt;
f=1&lt;br /&gt;
FOR i=2 TO num/2&lt;br /&gt;
&amp;nbsp; IF num MOD i=0 THEN f=0 : EXIT FOR&lt;br /&gt;
NEXT i&lt;br /&gt;
isPrime=f&lt;br /&gt;
END FUNCTION&lt;br /&gt;
&lt;br /&gt;
SUB display(testnum, result)&lt;br /&gt;
IF result=1 THEN&lt;br /&gt;
&amp;nbsp; PRINT testnum;&quot; is Prime!&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp;PRINT testnum;&quot; is Composite!&quot;&lt;br /&gt;
ENDIF&lt;br /&gt;
END SUB&lt;br /&gt;
&lt;br /&gt;
For more see upcoming post. &lt;br /&gt;
Best wishes!!!</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/7897264711108071759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/introduction-to-procedural-programming_01.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/7897264711108071759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/7897264711108071759'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/introduction-to-procedural-programming_01.html' title='Introduction to Procedural Programming - Part III'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-549774317076155788</id><published>2010-05-01T02:11:00.000-07:00</published><updated>2010-05-03T00:25:49.606-07:00</updated><title type='text'>Introduction to Procedural Programming in QBASIC - Part II</title><content type='html'>&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=pkhadka548043&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1556159005&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;In my last post&amp;nbsp;I had briefly discussed about procedure programming. Hope that might have&amp;nbsp;enlightened your knowledge of Procedural Programming in QBASIC. Today I will discuss, its significance, need and benefits.&lt;br /&gt;
I would like to start with a very popular verse, &quot;Divide and Conquer&quot;- this was practised by British Empire in 19th and 20th century; you might have learned in History. We know&amp;nbsp;this didn&#39;t sustain British Empire but believe me when you practice this in programming (viz. are&amp;nbsp;procedural or modular programming approach) you will feel more comport in writing larger size program after you understand and learn the technique.&lt;br /&gt;
&lt;br /&gt;
With the advent of development and progress in the&amp;nbsp;technology; faster and high-end processors development&amp;nbsp;made developer&amp;nbsp;think larger problems to be solved through programming. When such time came then&amp;nbsp;structure programming&amp;nbsp;failed and brought new difficulties in writing&amp;nbsp;larger sized programs. There&amp;nbsp;were lots of hards like complexities in debugging, repetition of codes, unmanageable codes, unnecessary growth in&amp;nbsp;size of programs and primarily&amp;nbsp;non-integrity codes&amp;nbsp;were the major problems. There was also need&amp;nbsp;of newer&amp;nbsp;methodology of programming and mean&amp;nbsp;time new dimension in the field of programming was introduced i.e. &lt;strong&gt;Procedural Programming Approach&lt;/strong&gt; &lt;em&gt;(often considered as modular programming in general words but keep it in mind the module (modular) and procedure (procedural) are different in the context of QBASIC. Procedure is small-size division whereas as Module is large-size division but both of them are division of blocks of code into very manageable form). &lt;/em&gt;&lt;br /&gt;
A whole program is breaked (synthesized) into manageable small segments (procedures/subprogram) either functions or sub-routine procedures according to need so that there is reusability of these procedures. From this line importance of procedures can be easily estimated. Let us outline these importance or benefits of procedure (procedural) programming approach:&lt;br /&gt;
&amp;nbsp; (i) Manageable size of code from division into several segments&lt;br /&gt;
&amp;nbsp; (ii) Reusability of codes which reduces size of program by significantly reducing lines of codes without&amp;nbsp; degrading performance rather optimizing performance.&lt;br /&gt;
&amp;nbsp; (iii) Higher&amp;nbsp;integrity in the codes as there is nearly zero repetition of same set of codes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;(iv) Larger sized programs easy to develop, debug and maintain.&lt;br /&gt;
&lt;br /&gt;
Though this is not enough so&amp;nbsp;many new paradigm of programming are introduced recently and pracised worldwidely but you can say they follow procedural approach with futher enhancements and features.&lt;br /&gt;
&lt;br /&gt;
At last but not least we must&amp;nbsp;admit that procedural programming paved a strong cornerstone in the field of programming.&lt;br /&gt;
&lt;br /&gt;
Hope you enjoyed reading this post. In next post you can find terms and terminologies, statements and functions of QBASIC&amp;nbsp;associated with procedural programming and also how to write procedure programs.&lt;br /&gt;
&lt;br /&gt;
Till then bye. Have a good time!!!</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/549774317076155788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/introduction-to-procedural-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/549774317076155788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/549774317076155788'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/05/introduction-to-procedural-programming.html' title='Introduction to Procedural Programming in QBASIC - Part II'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-6699721747573390385</id><published>2010-04-30T08:55:00.000-07:00</published><updated>2010-05-01T02:21:10.056-07:00</updated><title type='text'>Introduction to Procedural Programming - Part I</title><content type='html'>Writing Procedural Programs in QBASIC is simple. First lets understand what do you mean by procedural programs, what is benefit of it, why is it necessary in programming, its significance and how to all will be discussed in brief. You need to follow futher in the school text book. If anything like to know more from me please write to me.&lt;br /&gt;
Lets start. &lt;br /&gt;
Procedural word comes from procedure that means &quot;set of steps to carryout some task&quot;. Ofcourse procedural programming is a such a tactics (approach) of write programs where we will divide our whole problem (program) manageably into many procedures that will be invoked (called) at the time of need in program&amp;nbsp;to perform task as per required.&lt;br /&gt;
From above you might notice there are two aspects (components) in the procedural programming (programs) that are: (i) calling program and (ii) called program&lt;br /&gt;
Lets be clear about these two aspects first.&lt;br /&gt;
(i) What is calling program?&lt;br /&gt;
-&amp;gt; Basically the module program or sometime procedure (sub-program) itself may call another sub-program (procedure) or say pass control to it, such program is called calling program. Subroutines are called using optional statement &quot;Call&quot; and functions are invoked simply by using the function name either with &quot;Print statement&quot; or Assignment (Optional LET statement). &lt;br /&gt;
In other word we can also say that program from where subroutine is called or function is invoked is regarded as &quot;Calling Program&quot;.&lt;br /&gt;
(ii) What is called program?&lt;br /&gt;
-&amp;gt; The subroutine or function (also say sub-program/procedure) that is called or invoked are regarded as &quot;Called Program&quot;. Subroutine is enclosed within SUB...END SUB statements and Function is enclosed within FUNCTION...END FUNCTION statement. One more point&amp;nbsp;to be noted that there is another kind of user defined function as well which resides in the&amp;nbsp;module only cannot be allocated as seperate procedure that is DEF&amp;nbsp; FN... END DEF statement.&lt;br /&gt;
&lt;br /&gt;
In the next post I will distinguish between SUB and FUNCTION and FUNCTION and DEF FN.&lt;br /&gt;
Before please check your text book to get into futher topics. It will be very helpful to understand futher.&lt;br /&gt;
&lt;br /&gt;
Be patient and revise again and again to you can grab the discussions here.&lt;br /&gt;
&lt;br /&gt;
Good Luck.&lt;br /&gt;
Have a fun. Enjoy your time with your friends.</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/6699721747573390385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/introduction-to-procedural-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6699721747573390385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6699721747573390385'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/introduction-to-procedural-programming.html' title='Introduction to Procedural Programming - Part I'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-3167024412620966697</id><published>2010-04-30T08:12:00.000-07:00</published><updated>2010-04-30T08:15:23.550-07:00</updated><title type='text'>Counting vowels in the given string using User Defined Functions</title><content type='html'>&lt;span&gt;&lt;span&gt;&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=pkhadka548043&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1598633740&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 256px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/span&gt;DECLARE FUNCTION countvow(s$)&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;Enter testing string=&quot;;v$&lt;br /&gt;
PRINT &quot;Number of vowels=&quot;;countvow(v$)&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
FUNCTION countvow(s$)&lt;br /&gt;
FOR i=1&amp;nbsp;TO&amp;nbsp;LEN(s$)&lt;br /&gt;
&amp;nbsp; ch$=LCASE$(MID$(s$, i, 1))&lt;br /&gt;
&amp;nbsp; SELECT CASE ch$&lt;br /&gt;
&amp;nbsp; CASE &quot;a&quot;, &quot;e&quot;,&amp;nbsp;&quot;i&quot;, &quot;o&quot;, &quot;u&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt=cnt+1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;END SELECT&lt;br /&gt;
NEXT i&lt;span&gt;&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=pkhadka548043&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1598634461&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;br /&gt;
countvow=cnt&lt;br /&gt;
END FUNCTION</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/3167024412620966697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/counting-vowels-in-given-string-using.html#comment-form' title='33 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/3167024412620966697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/3167024412620966697'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/counting-vowels-in-given-string-using.html' title='Counting vowels in the given string using User Defined Functions'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>33</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-6688786795453278572</id><published>2010-04-30T04:31:00.000-07:00</published><updated>2010-04-30T04:40:06.442-07:00</updated><title type='text'>Generate Fibonacci series using Sub Routine</title><content type='html'>&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=pkhadka548043&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B002I0HJRM&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 259px; padding-right: 10px; padding-top: 5px; width: 141px;&quot;&gt;&lt;/iframe&gt;REM a, b, n parameters represents first term, second term and number of terms respectively&lt;br /&gt;
DECLARE SUB fibo(a, b, n)&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;First Term=&quot;; x&lt;br /&gt;
INPUT &quot;Second Term=&quot;;y&lt;br /&gt;
REM label number is for data validation that length of terms must be less or equal to 20&lt;br /&gt;
10:&lt;br /&gt;
INPUT &quot;How many terms=&quot;; z&lt;br /&gt;
IF&amp;nbsp;z&amp;gt;20 THEN 10&lt;br /&gt;
CALL&amp;nbsp;fibo(x, y, z)&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=pkhadka548043&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=B002DHGM50&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;align: left; height: 249px; padding-right: 10px; padding-top: 5px; width: 145px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
SUB fibo(a, b, n)&lt;br /&gt;
PRINT a, b,&lt;br /&gt;
REM first two terms are already printed so started from 3&lt;br /&gt;
FOR I = 3 to n&lt;br /&gt;
&amp;nbsp; s=a+b&lt;br /&gt;
&amp;nbsp; PRINT s,&lt;br /&gt;
&amp;nbsp; a=b&lt;br /&gt;
&amp;nbsp; b=s&lt;br /&gt;
NEXT I&lt;br /&gt;
END SUB</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/6688786795453278572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/generate-fibonacci-series-using-sub.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6688786795453278572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6688786795453278572'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/generate-fibonacci-series-using-sub.html' title='Generate Fibonacci series using Sub Routine'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-905123099177069174</id><published>2010-04-30T00:34:00.000-07:00</published><updated>2010-04-30T00:34:10.578-07:00</updated><title type='text'>Sum of digits of a number using User Defined Function (UDF)</title><content type='html'>DECLARE FUNCTION digitsum(n)&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;Enter testing number=&quot;;v&lt;br /&gt;
PRINT &quot;Sum of &quot;;n;&quot; is &quot;; digitsum(v)&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
FUNCTION digitsum(n)&lt;br /&gt;
a=n&lt;br /&gt;
WHILE NOT a=0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#39;writing NOT a=0 is same as writing a&amp;lt;&amp;gt;0&lt;br /&gt;
&amp;nbsp; r=n MOD 10&lt;br /&gt;
&amp;nbsp; s=s+r&lt;br /&gt;
&amp;nbsp;&amp;nbsp;n=int(n/10)&lt;br /&gt;
WEND&lt;br /&gt;
digitsum=s&lt;br /&gt;
END FUNCTION</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/905123099177069174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/sum-of-digits-of-number-using-user.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/905123099177069174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/905123099177069174'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/sum-of-digits-of-number-using-user.html' title='Sum of digits of a number using User Defined Function (UDF)'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-4967837411818038920</id><published>2010-04-30T00:28:00.000-07:00</published><updated>2010-04-30T00:28:10.410-07:00</updated><title type='text'>Summing up digits of provided number</title><content type='html'>Rem Sum of digits of Number Example: Sum of digits of&amp;nbsp;254 is 11&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;Number=&quot;;n&lt;br /&gt;
a=n&lt;br /&gt;
WHILE a&amp;lt;&amp;gt;0&lt;br /&gt;
&amp;nbsp; r=a MOD 10&lt;br /&gt;
&amp;nbsp; s=s+r&lt;br /&gt;
&amp;nbsp; a=int(a/10)&lt;br /&gt;
WEND&lt;br /&gt;
PRINT &quot;Sum of&amp;nbsp; digits of &quot;;a; &quot; is &quot;;s&lt;br /&gt;
END</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/4967837411818038920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/summing-up-digits-of-provided-number.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/4967837411818038920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/4967837411818038920'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/summing-up-digits-of-provided-number.html' title='Summing up digits of provided number'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-3060083014327910726</id><published>2010-04-29T22:49:00.000-07:00</published><updated>2010-04-29T22:49:00.688-07:00</updated><title type='text'>Testing Armstrong Number using User Defined Function</title><content type='html'>DECLARE FUNCTION arm(n)&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;Enter a testing number=&quot;;v&lt;br /&gt;
IF arm(v)=1 THEN&lt;br /&gt;
&amp;nbsp; PRINT v;&quot; is Armstrong Number&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp; PRINT v; &quot; is not Armstrong Number&quot;&lt;br /&gt;
ENDIF&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
FUNCTION arm(n)&lt;br /&gt;
f=0&lt;br /&gt;
a=n&lt;br /&gt;
WHILE a&amp;lt;&amp;gt;0&lt;br /&gt;
&amp;nbsp; r=a MOD 10&lt;br /&gt;
&amp;nbsp; s=s+r^3&lt;br /&gt;
&amp;nbsp; a=int(a/10)&lt;br /&gt;
WEND&lt;br /&gt;
IF s=n THEN f=1&lt;br /&gt;
arm=f&lt;br /&gt;
END FUNCTION</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/3060083014327910726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-armstrong-number-using-user.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/3060083014327910726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/3060083014327910726'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-armstrong-number-using-user.html' title='Testing Armstrong Number using User Defined Function'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-8609063963531940215</id><published>2010-04-29T22:43:00.000-07:00</published><updated>2010-04-29T22:43:55.294-07:00</updated><title type='text'>Testing Armstrong Number</title><content type='html'>Rem Number which is equal to the sum of cube of its digits is said to Armstrong Number&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;Enter testing number=&quot;;n&lt;br /&gt;
v=n&lt;br /&gt;
WHILE V&amp;lt;&amp;gt;0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;r = v MOD 10&lt;br /&gt;
&amp;nbsp; s=s+r^3&lt;br /&gt;
&amp;nbsp; v=int(v/10)&lt;br /&gt;
WEND&lt;br /&gt;
IF n=s THEN&lt;br /&gt;
&amp;nbsp; PRINT n; &quot; is Armstrong Number&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp; PRINT n; &quot; is not Armstrong Number&quot;&lt;br /&gt;
ENDIF&lt;br /&gt;
END</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/8609063963531940215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-armstrong-number.html#comment-form' title='72 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/8609063963531940215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/8609063963531940215'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-armstrong-number.html' title='Testing Armstrong Number'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>72</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-57026938843554941</id><published>2010-04-29T22:39:00.000-07:00</published><updated>2010-04-29T22:39:31.326-07:00</updated><title type='text'>Testing Palindrome</title><content type='html'>CLS&lt;br /&gt;
INPUT &quot;Enter string to be tested: &quot;;t$&lt;br /&gt;
t$=LCASE$(t$)&lt;br /&gt;
FOR I=LEN(t$) TO 1 STEP -1&lt;br /&gt;
&amp;nbsp; r$=r$+MID$(t$, I, 1)&lt;br /&gt;
NEXT I&lt;br /&gt;
IF r$=t$ THEN&lt;br /&gt;
&amp;nbsp; PRINT t$; &quot; is Palindrome!&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp; PRINT t$; &quot; is not Palindrome!&quot;&lt;br /&gt;
ENDIF&lt;br /&gt;
END</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/57026938843554941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-palindrome.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/57026938843554941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/57026938843554941'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-palindrome.html' title='Testing Palindrome'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-700416145257001452</id><published>2010-04-29T22:34:00.000-07:00</published><updated>2010-04-29T22:34:01.717-07:00</updated><title type='text'>Testing Palindrome Using Function...End Function</title><content type='html'>DECLARE FUNCTION rev$(s$)&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;Enter string to be tested&quot;; t$&lt;br /&gt;
t$=LCASE$(t$)&lt;br /&gt;
IF t$=rev$(t$) THEN&lt;br /&gt;
&amp;nbsp; PRINT t$;&quot; is Palindrome!&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp; PRINT t$;&quot; is not Palindrome!&quot;&lt;br /&gt;
ENDIF&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
FUNCTION rev$(s$)&lt;br /&gt;
FOR I = LEN(s$) to 1 STEP -1&lt;br /&gt;
&amp;nbsp; r$=r$+MID$(s$, I, 1)&lt;br /&gt;
NEXT I&lt;br /&gt;
rev$=r$&lt;br /&gt;
END FUNCTION</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/700416145257001452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-palindrome-using-functionend.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/700416145257001452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/700416145257001452'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/04/testing-palindrome-using-functionend.html' title='Testing Palindrome Using Function...End Function'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-7872990101651281291</id><published>2010-02-14T02:47:00.000-08:00</published><updated>2010-02-14T02:47:49.018-08:00</updated><title type='text'>Prime Composite Testing Program Using User Defined Function</title><content type='html'>DECLARE FUCTION ISPRIME(N)&lt;br /&gt;
CLS&lt;br /&gt;
INPUT &quot;Testing Number: &quot;;N&lt;br /&gt;
IF ISPRIME(N)=1 THEN&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; PRINT N; &quot; IS PRIME NUMBER&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp;&amp;nbsp; PRINT N;&quot; IS COMPOSITE NUMBER&quot;&lt;br /&gt;
ENDIF&lt;br /&gt;
&lt;br /&gt;
FUNCTION ISPRIME(N)&lt;br /&gt;
&#39;F if flag which is set to 1 means it is assumed to be prime at first&lt;br /&gt;
F=1&lt;br /&gt;
&#39;if there is any factor from 2 to half of the number n then the number is composite&lt;br /&gt;
FOR I= 2 TO N/2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IF N MOD I=0 THEN&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F=0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT FOR&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;br /&gt;
NEXT I&lt;br /&gt;
ISPRIME=F&lt;br /&gt;
END FUNCTION</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/7872990101651281291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/02/prime-composite-testing-program-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/7872990101651281291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/7872990101651281291'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/02/prime-composite-testing-program-using.html' title='Prime Composite Testing Program Using User Defined Function'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7807925557414569477.post-6922390802918197839</id><published>2010-02-14T02:42:00.000-08:00</published><updated>2010-02-14T02:42:48.797-08:00</updated><title type='text'>Prime Composite Testing Program</title><content type='html'>CLS&lt;br /&gt;
INPUT &quot;Test Number: &quot;;N&lt;br /&gt;
&#39;f is flag which is set to 0 indicating&amp;nbsp;testing number is prime&amp;nbsp;and 1 indicating testing number is composite&lt;br /&gt;
F=0&lt;br /&gt;
FOR I=2 TO N/2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF N MOD I=0 THEN &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; F=1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT FOR&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;br /&gt;
NEXT I&lt;br /&gt;
IF F=0 THEN&lt;br /&gt;
&amp;nbsp;&amp;nbsp; PRINT N;&quot; IS PRIME NUMBER&quot;&lt;br /&gt;
ELSE&lt;br /&gt;
&amp;nbsp;&amp;nbsp; PRINT N;&quot; IS COMPOSITE NUMBER&quot;&lt;br /&gt;
ENDIF</content><link rel='replies' type='application/atom+xml' href='http://qbasiconlinetrainning.blogspot.com/feeds/6922390802918197839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/02/prime-composite-testing-program.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6922390802918197839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7807925557414569477/posts/default/6922390802918197839'/><link rel='alternate' type='text/html' href='http://qbasiconlinetrainning.blogspot.com/2010/02/prime-composite-testing-program.html' title='Prime Composite Testing Program'/><author><name>Khadka</name><uri>http://www.blogger.com/profile/06440172385961162764</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh09didetwWaVPkVLRcBFNQs78SC42yQ1BGNByhq6BwAH6ujYdgImnIC4zlUIeH2CDXAS-H-4CvjFpNDb8OMgOJ1THZiNtJzOMHtYlAra-L6EtrxKqdh3dPvEtRDsuZog/s220/tomcruise05.jpg'/></author><thr:total>8</thr:total></entry></feed>