In QBASIC, you can create squares from 1 to 10 by using a loop and the LINE
statement. Here's a simple example:
FOR i = 1 TO 10
LINE (10, 10 * i)-(10 + i * 10, 10 * i + i * 10), , B
NEXT i
This code will draw squares of increasing size, starting from 1x1 to 10x10, with their bottom-left corners positioned vertically. Adjust the coordinates in the LINE
statement to position the squares as needed.
CLS FOR eachNum%=1 TO 10 STEP 2 PRINT eachNum% NEXT
To print multiplication tables in QBasic, you can use nested loops. The outer loop iterates through the numbers 1 to 10 (or any desired range), while the inner loop multiplies the current number by each number in the same range. Here's a simple example: FOR i = 1 TO 10 PRINT "Table of"; i FOR j = 1 TO 10 PRINT i; "*"; j; "="; i * j NEXT j PRINT NEXT i This code will display the multiplication tables for numbers 1 to 10.
In order to Download Qbasic you may do one, both or none of these two things: 1.) Go to "http://www.softpedia.com/get/Programming/Coding-languages-Compilers/Qbasic.shtml" and click download or 2.) use "Google.com" with the keywords Qbasic free download to find another website with a free qbasic downlaod.
You will need 100 of them, but they are rectangles, not squares.
In QBasic, you can generate the series 5, 55, 555, 5555, 55555 using a loop. You can start with a variable initialized to 5 and repeatedly multiply it by 10 and add 5 in each iteration. Here's a simple example: FOR i = 1 TO 5 num = 0 FOR j = 1 TO i num = num * 10 + 5 NEXT j PRINT num NEXT i This code will output the desired series.
10 CLS 20 FOR n = 1 to 10 30 PRINT n, n^2, n^3 40 NEXT n 50 PRINT: PRINT: PRINT "Touch 'x' to go again, any other key to end." 60 INPUT a$ 70 IF a$ = "X" or a$ = "x" THEN 10 80 END
CLS FOR eachNum%=1 TO 10 STEP 2 PRINT eachNum% NEXT
there are 10 squares if you count 100
-9
1 squared = 1. 10 squared = 100
1 000 000
3 squares: 36 + 4 + 1 2 squares: 25 + 16
First lay out 13 sticks to make 3 squares with a sick over. Then take 1 stick out. What is left is 3 squares. Simple!
There are 100 squares in a 10 by 10 grid.To discover the total number of squares in any square or rectangular grid, multiply the number of squares along two adjacent sides and you will arrive at the correct answer everytime.From Someone Else:The grid itself is a square alone; think about it, that's 1 on top of your 100.Look closer. There are actually 385 squares
11
5 of 10 shaded would be 1/2 or 0.5 of the total number of squares.
PRINT "What is your name ?" INPUT NAM$ CLS FOR N = 1 TO 10 PRINT NAM$ NEXT N