PROGRAMMING LANGUAGE: QBASIC/VERSION: QB64
...Program code...
intNum% = 2
CLS
PRINT "PROGRAM: POWERS OF N/(N ="; intNum%; ")"
FOR intEachLoopNum% = 0 TO 10
PRINT intNum%; " ^ "; intEachLoopNum%; " = "; intNum% ^ intEachLoopNum%
NEXT
...Output...
2 ^ 0 = 1
2 ^ 1 = 2
2 ^ 2 = 4
2 ^ 3 = 8
2 ^ 4 = 16
2 ^ 5 = 32
2 ^ 6 = 64
2 ^ 7 = 128
2 ^ 8 = 256
2 ^ 9 = 512
2 ^ 10 = 1024
*NOTE*: In QBASIC the mathematical symbol: ^...means 'raise to the power of'; thus, 2 ^ 3; actually means raise the number 2 to the power of 3/or, 2 x 2 x 2.
Write a program that calculates the area of a triangle in QBASIC
It doesn't have length, but you can use sizeof to find out its size.
QBASIC GRAPHICS There any many different things you can draw in QBASIC; ranging from... -dots -lines -rectangles -circles -shapes empty/or, filled in(painted) -you can even do LOGO style programming to draw graphics with; by joining up connected lines -animations are possible, too ==== QBASIC BUILT-IN HELP FILE + CODE EXAMPLES In order to view the QBASIC built-in Help file...; first, load the QBASIC program itself...; and, then, do a combination key press of: [SHIFT] + [F1] Use the built-in QBASIC Help file to learn more about how to use these 'graphic related' commands, and, more...! The QBASIC Help file also contains plenty of 'example codes'; which you can just use 'copy & paste'; then, RUN...to see what the output effect will be...???
num=32767 MsgBox(len(num))
if (n>0) printf ("%d is positive\n", n);
The sum of two positive integers is positive
An integer is any whole number. It could be positive, zero or negative.
The magnitude of an integer is the value of the integer with a positive (plus) sign. |5| = +5 = 5 |-5| = +5 = 5
6.
Add a positive number - fraction or integer - to the given fraction.
9,11,13
You need at least two numbers to find an LCM and they both have to be integers, but the LCM of 1 and any positive integer is that integer.
Find the factors of the number. If the only factors are 1 and itself, it is prime.A prime number is a positive integer with two factors: one and the number itself.A composite number is a positive integer with more than two factors.
Rule: The sum of two negative integers is a negative integer.Rule: The sum of two positive integers is a positive integer.Procedure: To add a positive and a negative integer (or a negative and a positive integer), follow these steps:1. Find the absolute value of each integer.2. Subtract the smaller number from the larger number you get in Step 1.3. The result from Step 2 takes the sign of the integer with the greater absolute value.
That question does not make sense An integer is any whole number (can be positive or negative)
Immediate reaction is 2010, on the basis that if xy = x2 then x = y...
n=27