answersLogoWhite

0

QBasic

QBasic is an integrated development environment (IDE) and interpreter for a variant of the BASIC programming language. QBasic includes a debugger with code modification and on-the-fly expression evaluation that can run under most versions of DOS, Windows, Linux and FreeBSD.

500 Questions

Write a programme to print first 10 even and odd numbers using if statement while loop?

User Avatar

Asked by Wiki User

#include<stdio.h>

int main ()

{

printf ("2 4 6 8 10 12 14 16 18 20");

return 0;

}

Write a program that prints the multiplication table for number 6?

User Avatar

Asked by Wiki User

'*** Choose which specific times tables number to print out...

intTablesNo%=6

'*** (CL)ear the Output (S)creen...

CLS

'*** Start of FOR/NEXT loop block statement/loop counts upwards from 1 to 12...

FOR intTimesNo%=1 TO 12

'*** PRINT out each times tables number sum...

PRINT intTimesNo%; " X "; intTablesNo%; " = "; intTimesNo%*intTablesNo%

'*** end of FOR/NEXT loop block statement...

NEXT

'*** END of program/halt program code execution...

END

'*** NOTE: Once you understand how the above program works...;

' then, you can safely DELETE all of the explanatory comment statement lines...

' each of which begin with a single apostrophe: ('). -Thanks! ;-)

Where can you download QBasic?

User Avatar

Asked by Wiki User

QBASIC free downlaods are from cnet.com or softepedia.com.

Hope this is helpful to you..... if u want anything else just mail it to rockmayur@live.com..

Who invented Qbasic?

User Avatar

Asked by Wiki User

-It was invented by two Darthmouth College professors, John Kemeny and Tom Kurtz in 1964.

-A 19 year old Bill Gates he call as Microsoft BASIC

How do you download QBasic?

User Avatar

Asked by Wiki User

In order to Download Qbasic you may do one, both or none of these two things:

1.) Go to "http://www.softpedia.com/get/Programming/Coding-languages-Compilers/Qbasic.shtml" and click download

or

2.) use "Google.com" with the keywords Qbasic free download to find another website with a free qbasic downlaod.

Will you please tell the GWBASIC program for the multiplication of two arrays?

User Avatar

Asked by Wiki User

just type "chikosalovakia" on gw basic .......................it will give you all instructions............it is a special code.................

How is qbasics relevant to a persons life?

User Avatar

Asked by Wiki User

At first, the student learns programming code purely by reading up about it...programming history...which is also the story of hardware/software; different programming languages...in fact, 100's of different programming languages...with newer programming languages being invented, constantly, all the time; concepts: procedural/functional/imperative/object oriented/compiler/interpreter/operating systems; different kinds of programs: based on numbers/text/graphics/sound/-etc.

Next, they decide...yes, this computer science field seems to be really interesting; why not let me try giving it a go myself; first, by copying & pasting other people's example codes; then, running/executing these programs to see if they will work/or, not...???

Next, they have a go at learning to write their own code; naturally, as with learning most subjects to begin with, they will find themselves making MANY mistakes; each of these mistakes will need to be very patiently found/and, then, corrected in order to make their programs work, effectively. Sometimes, after making so many mistakes, repeatedly; they will end up feeling like being a 'total fool!'

The big difference between a 'successful' programmer/and, a 'failed' programmer; is not usually a question of how intelligent the person is; as, the truth is, anyone of just plain normal average intelligence is capable of learning 'the art of programming'. Instead, it's more related to how fully determined they are to stick with learning; no matter how many times their code fails; try, try, again...; and, then, of course, you will, eventually, succeed.

I myself can remember attempting to go write loads of programs which failed; sometimes, I must confess, that I just could not work out why/or else, got totally tired and fed up of trying to go figure it all out?! I either deleted the program, altogether/or else, attempted to either modify/or, re-write the code again starting from total scratch. Whether the program failed/or, RAN successfully; I was still very highly determined to continue along my programming journey.

Some people think that programmers have to be really good at maths; well, all the maths I know is just really simple maths, indeed; namely, how to add/subtract/divide/multiply; thus, people are surprised to know that although I practice doing programming an awful lot, even, daily; yet, I'm not very good at maths in terms of having any high level understanding; in never actually passed any high level exam such as GCSE maths/which is 'base' level maths which school children learn. I guess, I just enjoy understanding the 'logic' of it all. Whereas, real life isn't always entirely logical, at all...?!

A = 1 : B = 2: C = A+B

Q: What's C? A: 3

...this kind of problem I find I have no trouble at all understanding; and, in fact, do seem to understand it almost instinctively; just like a duck taking to water.

I think, that many programmers enjoy programming because, secretly, it makes them feel like being the 'master' who is always issuing commands to the 'slave' computer; and, therefore, who is always 'totally in control!'

You don't need to know a whole entire proramming language in order to be able to use it effectively. Let's say you wish to write a 12 x tables program; and, the language includes 1000's of codes; well, you don't need to go learn all of those 1000's of codes; instead, you just need to learn enough codes that will enable you to get by to be able to write your 12 x tables program, successfully; such as a mere handful of say around 10 or so codes should really be enough.

I must confess that in all my years of practicing doing programming; I never learned a single programming language entirely in full, yet; at the most, I tend to learn about 1/2 of it; though, most times, less than a 1/4; and, yet still I was able to use whichever programming language I learned to create a multitude of different programs which all worked.

In learning certain complex subjects; there is a point when you are a 'beginner'; and, then, you feel you are totally 'outside' of it all...; not quite fully understanding/more doing pure guess work, instead...??? Then, with plenty of time/patience/practice; then, you find that both your skills/understanding do slowly improve; and, you are now actually able to think in terms of the programming language itself; well, suddenly, you've gone and 'crossed the line', and, become an 'insider', now; that is the say that skill has actually become a part of you; just like your body limbs are: arms/feet/-etc.; you will take this skill around with you whereever it is you go in life; and, for all the rest of your entire lifetime to come.

You find that you are, now, actually 'living' being in the programming language...for all of 24/7/366. So, whenever you see a sum written down: 1+1, on a paper sheet/or else, on TV/or, you heard that sum being spoken out aloud; your immediate thoughts are to interpret this problem in terms of programming code...

PRINT 1+1

Or, if you see a game such as noughts and crosses/chess/monopoly/-etc. Then, your immediate thoughts are to interpret this problem in terms of programming code; how would I draw that board? So, you go and emulate trying to write/play the very same game on the computer; be it 'manual' version/or else, 'automatic' version; you might even try coming up with a novel version entirely of your own.

That is how learning a programming language can, ultimately, change you; and, for all the rest of your entire life. You no longer see/interpret the world as being quite the same anymore; instead, if you see a simple shape such as a box-linke shape...be it door/cigerette box/speaker box/TV box/chester draws box/skyscraper shaped like a box...and, immediately, you find yourself thinking in terms of programming code...how would I draw that rectangle shape/and, put together all 4 sides of the box/what about the top and bottom lids of the box, how would I simulate that; could I make the box into a 3D shape that turns/how to color in the boxes sides/what about shape/length/angles/texture/weight/-etc.

You have a timetable written down on a paper sheet; why not translate this into becoming computing code, instead; which could be stored in a more compact form on say a USB memory stick/or, the file uploaded, and, then, accessed over the net from off any internet connected computing device in the world; 24/7/366! Why don't I write a program to password protect my timetable file so that nobody can find it easily; or, even better still, why don't I write a program to encrypt the data itself...so that even if people do find it; they still won't be able to see/understand what the content means?!/-Etc.

And, so on...and, so on...in this sense...when relating 'real life' situation/problems to programming practices; a progammers thinking process never ever actually ends...! Programmers do actually see, and, experience this entire 'world'...in terms which relates back to programming codes; to them everything IS a program; or, could become contained inside of a program; providing they can understand the problem well enough to be able to break it down, step by step; and, thus, be able to define it, effectively.

How do you write a program in BASIC to find the GCD and LCM of two integer numbers?

User Avatar

Asked by Wiki User

#include<stdio.h>

#include<conio.h>

void main()

{

int x,y,z,i;

clrscr();

printf("Enter Two Numbers = ");

scanf("d%d",&x,&y);

for(i=1;i<=x*y*z;i++)

{

if(i%x==0&&i%y==0)

{

printf("LCM is %d\n",i);

break;

}

}

getch();

}

WAP To print the squares of all even numbers from 1 to 20?

User Avatar

Asked by Wiki User

CLS

PRINT "PROGRAM: Print squares of all even numbers from 1 to 20"

PRINT

PRINT "number", "squared"

PRINT

FOR number% = 1 TO 20

IF number% MOD 2 = 0 THEN

PRINT number%, number% * number%

END IF

NEXT

END

How do you write a program to find the area and perimeter of a rectangle?

User Avatar

Asked by Wiki User

CLS

PRINT "PROGRAM: Calculate both perimeter/area of rectangle"

PRINT

INPUT " Length"; length

INPUT "Breadth"; breadth

PRINT

PRINT "Perimeter: "; 2 * (length + breadth)

PRINT " Area: "; length * breadth

END

How do you generate 1 22 333 4444 55555 series in qbasic?

User Avatar

Asked by Wiki User

REMPATTERNS (not necessary)

CLS

FOR I = 1 TO 5 STEP +1

FOR J = 1 TO I STEP+1

PRINT J

NEXT J

PRINT

NEXT I

END

Hope you find this helpful :)

Write the program in qbasic and add two numbers?

User Avatar

Asked by Wiki User

Cls

input "enter two no.s ",a,b

sum=a+b

print "sum = ";sum

end

How do you create a calculator on qbasic?

User Avatar

Asked by Wiki User

I was able to create a login program in qbasic with this simple code:

cls

1 input "Username: " , username$

if username$ <> "Define what you want your name to be here (use the quotes)" then goto 1

else input "Password: " , password$

if password$ <> "Again define using quotes" then goto 1 else print "You have successfully logged in!"

Hope this helps!

===

I would have rewritten the above code...-without using outdated line numbers/being combined together with goto statements-...as being the following...

'*** set username/password...

userName$="abc"

passWord$="123"

'*** get username/password

DO

CLS

PRINT "Log in..."

PRINT

INPUT "Username: ", guessUserName$

INPUT "Password: ", guessPassWord$

LOOP UNTIL guessUserName$=userName$ AND guessPassWord$=passWord$

'*** print welcome screen...

CLS

PRINT TIME$ + " " + DATE$

PRINT

PRINT "Congratulations, "; userName$; ", you have successfully logged in!"

Write an algorithm for bisection method?

User Avatar

Asked by Wiki User

#include[stdio.h]

#include[math.h]

#define epsilon 1e-6

void main()

{

double g1,g2,g,v,v1,v2,dx;

int found,converged,i;

found=0;

printf(" enter the first guess\n");

scanf("%lf",&g1);

v1=g1*g1*g1-15;

printf("value 1 is %lf\n",v1);

while (found==0)

{

printf("enter the second guess\n");

scanf("%lf",&g2);

v2=g2*g2*g2-15;

printf(" value 2 is %lf\n",v2);

if (v1*v2>0)

{found=0;}

else

found=1;

}

printf("right guess\n");

i=1;

while (converged==0)

{

printf("\n iteration=%d\n",i);

g=(g1+g2)/2;

printf("new guess is %lf\n",g);

v=g*g*g-15;

printf("new value is%lf\n",v);

if (v*v1>0)

{

g1=g;

printf("the next guess is %lf\n",g);

dx=(g1-g2)/g1;

}

else

{

g2=g;

printf("the next guess is %lf\n",g);

dx=(g1-g2)/g1;

}

if (fabs(dx)'less than' epsilon

{converged=1;}

i=i+1;

}

printf("\nth calculated value is %lf\n",v);

}

What is the function key to execute Qbasic program?

User Avatar

Asked by Wiki User

QBASIC operators are listed as follows.../along with some example QBASIC code...

->LOGICAL OPERATORS

AND

OR

NOT

EXAMPLE QBASIC CODE:-

A=1

B=1

IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False"

...output...

Result: True

A=1

B=2

IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False"

...output...

Result: False

-> MATHEMATICAL OPERATORS

+ plus

- minus

* multiply

/ divide

MOD division remainder

^ raise to the power

EXAMPLE QBASIC CODE:-

num1=4

num2=2

PRINT num1 + num2

PRINT num1 - num2

PRINT num1 * num2

PRINT num1 / num2

PRINT num1 MOD num2

PRINT num1 ^ num2

...output...

6

2

8

2

0

16

-> COMPARISON OPERATORS

= equals

> greater than

< lesser than

>= greater than/or, equals

<= lesser than/or, equals

<> not

EXAMPLE QBASIC CODE:-

num1 = 6

num2 = 8

IF num1 = num2 THEN PRINT "Equal to"

IF num1 > num2 THEN PRINT "Greater than"

IF num1 < num2 THEN PRINT "Lesser than"

IF num1 >= num2 THEN PRINT "Greater than/or, equal to"

IF num1 <= num2 THEN PRINT "Lesser than/or, equal to"

IF num1 <> num2 THEN PRINT "NOT equal"

...output...

Lesser than

Lesser than/or, equal to

NOT equal

How you draw a circle in qbasic?

User Avatar

Asked by Wiki User

You need the screen coordinates of the end-points. That's another whole topic.

Say the end-points are (A,B) and (C,D).

To draw a solid line connecting these points:

LINE (A,B) - (C,D)

What is the difference between an inactive file and dead file?

User Avatar

Asked by Wiki User

Active file: An active file is where you use a file quite frequently.

Inactive file: A file that you use but not as frequently.

Dead file: A dead file is where you don't use the file at all and is stored in your archives

Write a qbasic program to display the multiplication tables from 1 to 10?

User Avatar

Asked by Wiki User

Writing this QBASIC code purely on the fly...; without actually testing out if it works/or, not...

CLS

FOR tablesNo%=1 TO 10

FOR timesNo%=1 TO 10

PRINT timesNo%*tablesNo%; " ";

NEXT

PRINT

NEXT

END

NOTE: The numbers are not yet formatted to line up perfectly straight with one another.

How do you underline text with stars in qbasic?

User Avatar

Asked by Wiki User

strText$ = "Some text to be underlined."

CLS

PRINT strText$

PRINT STRING$(LEN(strText$), "*")

What is the HTML code for enter?

User Avatar

Asked by Wiki User

Use <br /> for a new line. Use <p></p> for a new paragraph.

or if you want to link to a website or another page you put

<html>

<body>

<a href="the page or site you want to link">button text here</a>

</body>

</html>