1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sedbober [7]
2 years ago
6

In Qbasic how I type the diference between two numbers?

Computers and Technology
2 answers:
zavuch27 [327]2 years ago
8 0

Answer:

REM PROGRAM TO DISPLAY SUM OF TWO NUMBERS

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

S = A + B

PRINT “SUM OF TWO NUMBERS”; S

END

USING SUB PROCEDURE

DECLARE SUB SUM (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

CALL SUM(A, B)

END

SUB SUM (A, B)

S = A + B

PRINT “SUM OF TWO NUMBERS”; S

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION SUM (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

S = SUM(A, B)

PRINT “SUM OF TWO NUMBERS”; S

END

FUNCTION SUM (A, B)

SU = A + B

SUM = SU

END FUNCTION

2. Enter any two numbers and display its difference.

REM PROGRAM TO DISPLAY DIFFERENCE OF TWO NUMBERS

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

D = A - B

PRINT “DIFFERENCE OF TWO NUMBERS”; D

END

USING SUB PROCEDURE

DECLARE SUB DIFF (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

CALL DIFF(A, B)

END

SUB DIFF (A, B)

D = A - B

PRINT “DIFFERENCE OF TWO NUMBERS”; D

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION DIFF (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

DI = DIFF(A, B)

PRINT “DIFFERENCE OF TWO NUMBERS”; DI

END

FUNCTION DIFF (A, B)

D = A - B

DIFF = D

END FUNCTION

3. Enter any two numbers and display its product.

REM PROGRAM TO DISPLAY PRODUCT OF TWO NUMBERS

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

P = A * B

PRINT “PRODUCT OF TWO NUMBERS”; P

END

USING SUB PROCEDURE

DECLARE SUB PROD (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

CALL PROD(A, B)

END

SUB PROD (A, B)

P = A * B

PRINT “PRODUCT OF TWO NUMBERS”; P

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION PROD (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

PR = PROD(A, B)

PRINT “PRODUCT OF TWO NUMBERS”; PR

END

FUNCTION PROD (A, B)

P = A * B

PROD = P

END FUNCTION

4. Enter any two numbers and display its average.

REM PROGRAM TO DISPLAY AVERAGE OF TWO NUMBERS

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

AV = (A + B) / 2

PRINT “AVERAGE OF TWO NUMBERS”; AV

END

USING SUB PROCEDURE

DECLARE SUB AVERAGE (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

CALL AVERAGE(A, B)

END

SUB AVERAGE (A, B)

AV = (A + B) / 2

PRINT “AVERAGE OF TWO NUMBERS”; AV

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION AVERAGE (A, B)

CLS

INPUT “ENTER FIRST NUMBER”; A

INPUT “ENTER SECOND NUMBER”; B

AVGR = AVERAGE(A, B)

PRINT “AVERAGE OF TWO NUMBERS”; AVGR

END

FUNCTION AVERAGE (A, B)

AV = (A + B) / 2

AVERAGE = AV

END FUNCTION

Explanation:

Pls mark brainliest

Fofino [41]2 years ago
4 0

Answer:

its because a number segment is diffrent

Explanation:

bc thats what it is

You might be interested in
Which is an unethical use of technology and resources at the workplace?
Greeley [361]
The answer is B. sharing a coworker’s performance scores with your colleagues
6 0
3 years ago
Read 2 more answers
Name the tools in plant propagation.<br>Q<br>18.<br>16.<br>17.<br>19.<br>20.<br>please po asap​
Agata [3.3K]
16. Branch or tree cutter
17.paint tape
18. Knife
19. Pots
20. Waterer
6 0
3 years ago
Which of the following is a type of savings vehicle? A.Certificate of Deposit
Ksivusya [100]
<span>A is the correct answer. A Certificate of Deposit is a savings vehicle that offers a particular, fixed date of maturity for someone, with high interest rates as a result of this fixed term - they cannot remove the money early without incurring a loss of potential earnings.</span>
3 0
3 years ago
3. List and explain FIVE (5) types of services performed by<br>operating system?​
leonid [27]
Memory Management
Processor Management
Device Management
File Management
Security
7 0
3 years ago
Read 2 more answers
Technology deals with...
aivan3 [116]

Answer:

<em>C</em>

Explanation:

technology deals with the use of computers in school and work

4 0
3 years ago
Other questions:
  • What is the name given to the software testing technique, which basically consists of finding implementation bugs using malforme
    7·2 answers
  • You are in a library to gather information from secondary sources, and you want to find a current print resource that can supple
    6·1 answer
  • Write a program that read first a user's given name followed by the user's age from standard input. Then use an ofstream object
    8·1 answer
  • find all breweries that specialize in a particular beer style. A brewer is considered specialized if they produce at least 10 be
    5·1 answer
  • As a safe driver, you cannot, __________
    13·1 answer
  • How many Pokemon have only one type? In other words, for how many Pokemon is Type2 blank?
    6·1 answer
  • You can use your student ID card to get discounts in all of the following except
    6·2 answers
  • Help fast pleas. 3. How is this text formatted? (1 point)
    14·1 answer
  • The first cell phones in widespread use were . Smartphone technological advancements added services. Answer the following questi
    12·2 answers
  • declaring a member as in the base class provides access to that member in the derived classes but not to anyone else.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!