To print factorial of anyinput number QBASIC
1 answer:
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
<span>Satellite images are based on data obtained by landsat satellites. </span>
False. The second stage of digestion happens in the stomach.
Answer:
you can
Explanation:
you can
Library books and items bought in stores are 2 different applications that make use of barcodes.
Answer:
30 djjjjj*fjfktdyldydxpitdotdtiotdtod