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
In UML behavioral modeling, a message is _____. (Points : 6) a named location in memory where information is deposited and retri
rusak2 [61]

Answer: a function or procedure call from one object to another object

Explanation: UML(Unified Modeling language) behavioral modeling is the depiction of the relation of the elements in a dynamic manner and the dependency on time .Message in the UML behavioral modeling is a functional call taking place from one element to another.

The interaction is the model is seen through the flow of messages.Other options are incorrect because message is not information holding data structure, does not display the relation between object rather presents the flow and is not a memory location .

7 0
3 years ago
Assume the number variable contains the number 1000.
Inga [223]

Answer:

Explanation:

We could get the four options for this particular example, but we must know what happens with the variable number the value 1000.

In this case, we are going to assume four scenarios:

1) n = n - n this is equal to 0

2) n = (n - n) + n = 1000

3) n = n * 2 = 2000

4) n = n * 3 = 3000

These are simple examples, we could get these options in different ways.

5 0
3 years ago
Which statement regarding socializers is true?
allochka39001 [22]

Answer:

The answer is: they are comparable to suit of hearts

Explanation:

The answer is: they are comparable to suit of hearts

7 0
3 years ago
Read 2 more answers
Mm
Luba_88 [7]

Answer:

Print Area

Explanation:

First, I'll assume Donte is making use of a spreadsheet application (Microsoft Office Excel, to be precise).

From the given options, only "Print Area" fits the given description in the question.

The print area feature of the Excel software allows users to print all or selected workbook.

To print a selection section, Donte needs to follow the steps below.

Go to File -> Print.

At this stage, Donte will have the option to set the print features he needs.

Under settings, he needs to select "Print Selection"; this will enable him Print sections of the entire workbook.

Refer to attachment for further explanation

8 0
3 years ago
how do you know if you passed your freshman year and are promoted to a sophomore status? I need a 100% accurate answers from I g
AlekseyPX
As long as you received the credits for every core class you have become a sophomore
4 0
3 years ago
Other questions:
  • You need to design a data storage scheme for Hayseed Heaven library data system. There are several hundred thousand large data r
    8·1 answer
  • Briefly explain the benefits and consequences of technology. //PLEASE ANSWER//
    9·1 answer
  • Maia notices that her paragraphs are too close to one another. She wants to increase the space. Which arrangement of steps does
    6·2 answers
  • Which type of address is used in a packet to address the packet to a single host??
    12·1 answer
  • Which of the following advertisements is most likely a legitimate job advertisement?
    14·2 answers
  • There are only three active stations in a slotted aloha network: a, b, andc. each station generates a frame in a time slot with
    15·1 answer
  • What computer worm was used to sabatoge iran's nuclear program?
    11·1 answer
  • In their legacy system. Universal Containers has a monthly accounts receivable report that compiles data from Accounts, Contacts
    6·1 answer
  • A company has a number of employees. The attributes of EMPLOYEE include Employee ID (identifier), Name, Address, and Birthdate.
    11·1 answer
  • Easy coding question, please help.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!