### IF Statement and FOR Statement in QBasic Examples

To find positive negative or zero. CLS INPUT "Enter any number&quot ; a IF a > 0 THEN PRINT "The number is positive" ELSEIF a < 0 THEN PRINT "The number is negative" ELSE PRINT "The number is zero" END …

### Modular Programming in QBASIC Examples

1. Test whether the given number is positive or negative. SUB PROCEDURE DECLARE SUBTEST(N) CLS INPUT "Enter a number"; N CALL TEST(N) END SUB TEST(N) IF N>0 THEN PRINT N; "is positive number" ELSE PRINT N; "is negative number" END …

### Examples of Algorithm and Flowchart

Sum of Two Numbers Algorithm STEP 1: Start STEP 2: Accept the first number a. STEP 3: Accept the second number b. STEP 4: Add a and b , and store in SUM. STEP 5: Display the value of SUM. …

### Algorithm and Flowchart-Introduction

Program Design Tools Computers are problem solving devices and it is an electronic programmable machines that requires a set of instructions to perform tasks. To facilitate a computer to solve problems effectively, clear and concise instructions must be provided …

### Modular Programming-Introduction

Modular programming. Modular programming is the process of subdividing a program into separate sub-programs. Each modular program has one main module and may have other sub modules and sub module of a program is also called as procedure. Similar …

### Library Functions in QBASIC-Introduction

Introduction: A function is a built-in formula or a ready made program which helps us to perform a certain task such as mathematical, financial, logical etc. A function manipulates data passes to it and returns either a string or a …

### QBASIC Programming- Simple

QBASIC Programming Sum of two numbers CLS REM To find Sum of two numbers INPUT "Enter the first number"; a INPUT "Enter the second number"; b SUM = a + b COLOR 5 PRINT TAB(5); "The sum of two number …

### QBASIC Statements

QBASIC Statements: Any command or the instructions in the QBASIC is called a statement. Statements are classified into executable and non-executable. Executable statement specify actions and non-executable statements specify characteristics, arrangements and initial values of data. Some of the QBASIC …