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
Neview of related literature happens in two wayo (1) Traditional and
Greeley [361]

Answer:

I dont know the question all i know is the answers or whatever

Explanation:

8 0
3 years ago
What is the GCF of 48mn and 81mn??<br> O 3mn<br> O 3m?n<br> O 48mºn<br> O 129mn
vitfil [10]

Answer:

A. 3mn

Explanation:

48 divides by 2 48 = 24 x 2

then =2 x 2 x 12

then = 2 x 2 x 2 x 2 x 3

greatest factorization is 3 therefore,

3mn is the answer

8 0
3 years ago
Im building my first gaming pc, got any part suggestions or tips?
ladessa [460]

Answer:

You should find a good game engine that is not hard. Unity and Unreal are some good ones.

You should also search for the programming language you like the most, and use engines that use that specific language.

5 0
3 years ago
Read 2 more answers
You can use automatic link-checking software to identify invalid hyperlinks. if you find invalid links, what should you do next?
Solnce55 [7]
Correct the href value of the appropriate anchor.
7 0
3 years ago
1<br> Q9. Which tool is used to cancel the<br> action of undo tool ? *
Stels [109]

Answer:

hold down CTRL + Z and it will reverse to the last action

6 0
3 years ago
Other questions:
  • You try to enter your name into a cell that accepts a numeric value. What error would you receive
    12·2 answers
  • We may think of relationships in the E/R model as having keys, just as entity sets do. Let R be a relationship among the entity
    14·1 answer
  • The security administrator for PLABS.com recommends using a host-based firewall for all servers and workstations. What can a hos
    6·1 answer
  • In object-oriented analysis, objects possess characteristics called _____.â
    14·1 answer
  • 1. Create an array of ints with 20 elements. With a random number generator, seeded with time, assign a random number between 1
    8·1 answer
  • Technology offers a variety of rich opportunities available to teachers and students. According to Inan and Lowther (2010), ther
    6·1 answer
  • Hurry asap it’s times
    8·1 answer
  • This statement lets the value of a variable or expression determine where the program will 1. switch 2. select 3. associative 4.
    11·1 answer
  • Which kind of results will appear using the search query "Frosty the Snowman" in quotation marks?
    6·1 answer
  • Name the character encoding standard that enables up to 128 different commonly used characters,
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!