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

How do make 10student name and his remarks in q-basic?

User Avatar

Asked by Wiki User

'

'*** PROGRAM: Collecting student data: names/marks.

'

'*** Create 2 array variables to store each students name/marks...

DIM students$(10), marks$(10)

'*** SCREEN ONE/Collect the data...

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

'*** print heading...

PRINT "PROGRAM: Collecting each student names/marks..."

PRINT

'*** A FOR/NEXT loop is used to collect each individual students data...

FOR eachStudentNo% = 1 TO 10

'*** Get each students names/marks

'by typing these values in from the keyboard....

PRINT eachStudentNo%; ">"

INPUT " Enter student name"; students$(eachStudentNo%)

INPUT "Enter student marks"; marks$(eachStudentNo%)

NEXT

'*** SCREEN TWO: Output the collected data...

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

'*** Print headings...

PRINT "Student No.", "Student Name", "Student Marks"

PRINT

'*** FOR/NEXT loop is used to print out the 2 array student 'name/marks' values...

FOR eachStudentNo% = 1 TO 10

'*** print out each students 'number/name/mark' values...

PRINT eachStudentNo%,

PRINT students$(eachStudentNo%),

PRINT marks$(eachStudentNo%)

NEXT

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

What is a sub programs in qbasic?

User Avatar

Asked by Wiki User

Sub programs allow you to break up one long program; into being a series of much smaller tasks; usually, controlled by a main program. Example...

====

As you can see from the above 2 examples; the 2nd example, although longer, creates code that is much clearer and simpler to read. Even non-programmers should be able to figure out what the 'Main Program' section is doing.

NOTE: There are certain rules for the use of sub-routines. Such as the sub routine should confine itself to doing just 'one' task at a time. So, SUB clearScreen...does just 'one' job, alone...which is to (CL)ear the output (S)creen. It does NOT clear the screen AND get the user to input a number. This makes it quicker and easier to debug programs; as you know exactly where the code is going wrong; so, for example, if the screen didn't clear, properly...then, look at the Sub-routine called: SUB clearScreen. If the title didn't appear; then, look at the Sub-routine called: SUB printTitle. /-Etc.

How do you prepare a program in basic to display the word and the number of letters in it when is given as input?

User Avatar

Asked by Wiki User

10 cls

20 input"enter word";word$

30 print word$

40 print len(word$)

50 end

this program is for GW BASIC for other BASIC's the line numbers are optional.

How yo draw a star in qbasic?

User Avatar

Asked by Wiki User

What is the purpose of wend statement in while loop in gw-basic?

User Avatar

Asked by Wiki User

While--wend statement is used to execute a loop until a given condition is true.if the condition is false the loop ends and the program continous to the line following eend.

Write a program to swap two numbers using function?

User Avatar

Asked by Wiki User

swap (int *a, int *b) {

*a ^= *b;

*b ^= *a;

*a ^= *b;

}

What company created QBasic?

User Avatar

Asked by Wiki User

Q - basic was created by Microsoft

Write a basic program to sort ten numbers?

User Avatar

Asked by Wiki User

DIM nums(10)

CLS

FOR i = 0 TO 9

nums(i) = (RND * 10) + 1

PRINT nums(i)

NEXT

PRINT : PRINT "Press Enter to sort numbers"

rem pause to look at numbers

DO WHILE INKEY$ = "": LOOP

CLS

FOR loop1 = 0 TO 9

FOR loop2 = loop1 + 1 TO 9

IF nums(loop1) > nums(loop2) THEN SWAP nums(loop1), nums(loop2)

NEXT

NEXT

FOR i = 0 TO 9: PRINT nums(i): NEXT

What is the use of qbasic?

User Avatar

Asked by Wiki User

BASIC is an acronym which means...

(B)eginner's (A)ll-purpose (S)ymbollic (I)nstruction (C)ode

As a part of the name already implies: (A)ll-purpose/QBASIC is a 'general purpose' programming language; which may be used to write all different sorts of programs, including...

-games

-noughts & crosses/tic tac toe

-databases

-maths

-english

-random poetry

-guess the number

-random graphics

-musical notes

-etc.

This is in direct comparison to certain other programming languages which were designed to do only one main task alone; such as...

FORTRAN/main purpose: Science/Maths

COBOL/main purpose: Business

LOGO/main purpose: Graphics

HTML/main purpose: Write/present web pages

-etc.

Write a program for 3x3 matrix?

User Avatar

Asked by Wiki User

#include<stdio.h>

#include<conio.h>

void main()

What do 'Q' stands for in QBASICS?

User Avatar

Asked by Wiki User

"Quick"

Write a qbasic program to accept a no and print it multiple table?

User Avatar

Asked by Wiki User

Cls

print the multiples tables of 1 to 5

for x=1 to 5

for y=1 to 10

print x;"*";y;"=";x*y

next y

print

print

next x

end