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
Papessa [141]
3 years ago
6

To print factorial of anyinput number QBASIC​

Computers and Technology
1 answer:
lukranit [14]3 years ago
5 0

Answer:

The program in QBasic is as follows;

PRINT "Number: "

INPUT N

LET FACT = 1

FOR I = 1 TO N

     FACT = FACT * I

NEXT I

PRINT FACT

END

Explanation:

This prompts user for number

PRINT "Number: "

This accepts input from the user

INPUT N

This initializes the factorial to 1

LET FACT = 1

This iterates through the number the user inputs and calculates its factorial

<em>FOR I = 1 TO N </em>

<em>      FACT = FACT * I </em>

<em>NEXT I </em>

This prints the factorial

PRINT FACT

The program ends here

END

You might be interested in
Which option is used in emails to inform the recipient that they should exercise discretion in accordance with sharing the conte
Kay [80]
Priority levels hehe good luck!
5 0
3 years ago
What function would you use to calculate the total interest paid for the first year of a mortgage?.
WITCHER [35]

Answer:

To calculate the total interest paid for the first year of a mortgage, the formula M = [P.r (1+r)n] / [(1+r)n-1] × 12 can be used.

Explanation:

3 0
2 years ago
A text-only forum accessed through a bulletin board service (BBS) is known as a _____.
Tcecarenko [31]

Answer:

newsgroup---for apex

3 0
4 years ago
Attacking systems by exploiting otherwise unknown and unpatched vulnerabilities is also known as:
Nostrana [21]

Answer:

Zero-day exploits

Explanation:

Zero-day exploits refers to recently found vulnerabilities in a computer software program that has been in existence but was hitherto not known and addressed by the software security experts, however, these vulnerabilities were known to hackers. While the existence of these "loop-holes" in the software can go on unnoticed for several years, hackers can take advantage of it to cause harm to the computers' programs and data.

When these attacks occur, it is called a zero-day because the attack took place on the very day that the loop-hole was discovered in the software. So exploitation has already taken place before a fix is carried out.

5 0
3 years ago
You have been given the following String which represents a series of 6 side die rolls:rolls = "1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,
Anni [7]

Answer:

see explaination

Explanation:

rolls="1,5,2,3,5,4,4,3,1,1,1,2,3,1,5,6,2"

list1 = list(rolls.split(","))

print("The total # of rolls: {}".format(len(list1)))

j=0

for i in list1:

j+=int(i)

print("Total value of all rolls: {}".format(j))

print("Average roll: {}".format(j/len(list1)))

Please kindly check attachment for program code and output

8 0
3 years ago
Other questions:
  • If you want to place the insertion point in a cell to edit a specific part of its contents, you can
    5·1 answer
  • Which CSS attribute would change an element's font color to blue? font-color: blue; background: blue; color: blue; background-co
    10·2 answers
  • What is the value of the result after the following statement is executed? int result = 2 + 3 + 4 ;
    7·1 answer
  • A student that earns a well qualified score on an ap exam would receive a ___
    13·1 answer
  • Managers looking for advice on properly dealing with obsolete technology hardware can: a) consult the e-Stewards program b) seek
    9·1 answer
  • Describe the difference between the while loop and the do-while loop.
    7·1 answer
  • Write a program whose input is two integers. Output the first integer and subsequent increments of 5 as long as the value is les
    8·1 answer
  • Yeah help me please......................
    9·1 answer
  • How did transistors revolutionize the world of computers?
    15·1 answer
  • Rocks created from compaction and cementation of sediments are called:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!