answersLogoWhite

0

It's been a long time since I've written any BASIC.

There are a few ways this could be done. This way creates a table (array) with the values, then prints the table:

10 DIM A(10)

15 FOR X=1 TO 10

20 A(X)=2*X

25 NEXT

30 FOR X=1 TO 10

35 PRINT A(X); ", ";

40 NEXT

45 END

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Art & Architecture

What is the value of a sister corita print?

email the Corita Art Center staff, with the name of the print or if the print is unmounted you will find a set of numbers on the low left corner of the print. 2 first numbers is the year of the print, second set is the number of the print been printed that year.


How much is a colin paynton print worth?

2 million


Eduardo reduced the size of a painting to a height of 2 in what is the new width if it was originally 10 in wide and 20 in tall?

This question is not about painting, it's about math. It is a proportion problem: 2 is to 20 as "X" is to 10. Cross multiplication yields the equation 2*10 = X*20, which gives the answer X = 1.For what it's worth, Eduardo is ending up with a pretty small painting...


What are 2 ways in making a photographic print?

1. Contact - in which the negative is sandwiched with the print paper and exposed to light, then the print developed2. enlargement - in which the negative is projected and focused on the paper to be exposed, which is then developed as above.Contact prints are suitable for a "quick look" such as to pick which pictures to "enlarge".You have to do so because most people cannot tell what a picture looks like from its negative.


How much is the painting with the hiding Siamese cat worth by gene pelham?

Between $100 and $200 if it's the actual oil painting. If it's a print, then not much. I have the large framed print myself. It measures (with black and green wood frame) 37 1/2 " x 40 1/2" . Got mine for free on Craigslist.

Related Questions

How do you print even number in qbasic?

In QBasic, you can print even numbers using a simple loop. For example, you can use a FOR loop to iterate through a range of numbers and then check if each number is even by using the modulus operator (MOD). Here's a sample code snippet: FOR i = 1 TO 20 IF i MOD 2 = 0 THEN PRINT i NEXT i This code will print all even numbers from 1 to 20.


How do you print numbers as even numbers in a loop in qbasic?

To print even numbers in a loop in QBasic, you can use a FOR loop to iterate through a range of numbers and check if each number is even. An even number can be identified using the modulus operator (MOD). Here's a simple example: FOR i = 1 TO 20 IF i MOD 2 = 0 THEN PRINT i END IF NEXT i This code will print all even numbers from 1 to 20.


What is the function key to execute Qbasic program?

QBASIC operators are listed as follows.../along with some example QBASIC code... ->LOGICAL OPERATORS AND OR NOT EXAMPLE QBASIC CODE:- A=1 B=1 IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False" ...output... Result: True A=1 B=2 IF (A AND B) THEN PRINT "Result: True" ELSE PRINT "Result: False" ...output... Result: False -> MATHEMATICAL OPERATORS + plus - minus * multiply / divide MOD division remainder ^ raise to the power EXAMPLE QBASIC CODE:- num1=4 num2=2 PRINT num1 + num2 PRINT num1 - num2 PRINT num1 * num2 PRINT num1 / num2 PRINT num1 MOD num2 PRINT num1 ^ num2 ...output... 6 2 8 2 0 16 -> COMPARISON OPERATORS = equals > greater than < lesser than >= greater than/or, equals <= lesser than/or, equals <> not EXAMPLE QBASIC CODE:- num1 = 6 num2 = 8 IF num1 = num2 THEN PRINT "Equal to" IF num1 > num2 THEN PRINT "Greater than" IF num1 < num2 THEN PRINT "Lesser than" IF num1 >= num2 THEN PRINT "Greater than/or, equal to" IF num1 <= num2 THEN PRINT "Lesser than/or, equal to" IF num1 <> num2 THEN PRINT "NOT equal" ...output... Lesser than Lesser than/or, equal to NOT equal


How do you print the first 20 even numbers in qbasic?

startNum% = 0 endNum% = 38 counter% = 1 PRINT "Counter", "Number" PRINT FOR num% = startNum% TO endNum% STEP 2 PRINT counter%, num% counter% = counter% + 1 NEXT *NOTE*: This prints out all of the even numbers starting from 0 up to 38; if you didn't wish 0 to be included as well; then, change it to say... startNum% = 2 endNum%= 40


Relational operator string vs numarical?

QBASIC relational operators are... = equal > greater than < lesser than >=greater than/OR, equal to <=lesser than/OR, equal to EXAMPLE QBASIC CODE:- IF 1 > 2 THEN PRINT "1 greater than 2" IF 1 < 2 THEN PRINT "1 lesser than 2" IF 1 = 2 THEN PRINT "1 equal to 2" IF 1 >= 2 THEN PRINT "1 greater than/OR, equal to 2" IF 1 <= 2 THEN PRINT "1 lesser than/OR, equal to 2" ...Output... 1 lesser than 2 1 lesser than/OR, equal to 2 Press any key to continue... QBASIC mathematical operators are... + plus - minus / divide * multiply MOD modulus (remainder) ^ raise to the power EXAMPLE QBASIC CODE:- PRINT "3 + 3 = "; 3 + 3 PRINT "3 - 3 = "; 3 - 3 PRINT "3 / 3 = "; 3 / 3 PRINT "3 * 3 = "; 3 * 3 PRINT "3 MOD 3 = "; 3 MOD 3 PRINT "3 ^ 3 = "; 3 ^ 3 ...Output... 6 0 1 9 0 27 Press any key to continue...


How do you add odd numbers only in qbasic from 1 to 10?

CLS FOR eachNum%=1 TO 10 STEP 2 PRINT eachNum% NEXT


Find the power of a positive integer in qbasic?

PROGRAMMING LANGUAGE: QBASIC/VERSION: QB64 ...Program code... intNum% = 2 CLS PRINT "PROGRAM: POWERS OF N/(N ="; intNum%; ")" PRINT 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.


What is the program in QBASIC to print the following series 1 4 9 16?

10 CLS: PRINT "I shall now amaze the audience by printing " 20 PRINT "the four smallest perfect square integers." 30 for N = 1 to 4 : PRINT N, N^2 : NEXT N 40 PRINT: PRINT "Thank you." 50 PRINT "You've been a wonderful audience." 60 PRINT "I'm here until Friday." 70 PRINT "Don't forget to tip your waiter."


What is the code to print odd numbers from 20 to 30 in qbasic?

The following code will produce a list of numbers in steps of 2. It can be modified for any start & end number, and the size of the step. start% = 21 end% = 29 FOR num% = start% TO end% STEP 2 PRINT num% NEXT The above code will produce the results 21,23,25,27 & 29


Write a qbasic program to print the squares and cubes of first 10 natural numbers?

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


How do you write a program in QBASIC to print the names of any 5 laptop companies?

EXAMPLE 1 - LANGUAGE: QBASIC '*** printing string literals... CLS PRINT "Laptop manufacturers:-" PRINT PRINT "Toshiba" PRINT "Sony" PRINT "Apple" PRINT "Dell" PRINT "Samsung" END EXAMPLE 2 - LANGUAGE: QBASIC '*** printing string values from an array name variable... DIM companyName$(5) companyName$(1) = "Toshiba" companyName$(2) = "Sony" companyName$(3) = "Apple" companyName$(4) = "Dell" companyName$(5) = "Samsung" CLS PRINT "Laptop manufacturers:-" PRINT FOR eachCompanyNo% = 1 TO 5 PRINT companyName$(eachCompanyNo%) NEXT END EXAMPLE 3 - LANGUAGE: QBASIC '*** READing/and, PRINTing from DATA statements list... CLS PRINT "Laptop manufacturers:-" PRINT READ eachCompanyName$ DO WHILE eachCompanyName$<>"EOF" PRINT eachCompanyName$ READ eachCompanyName$ LOOP END DATA "Toshiba","Sony","Apple","Dell","Samsung" DATA "EOF" *NOTE*: There are many more ways that it's possible to do this, too. Including... -Storing data in an external text based file(.txt/.dat/.csv); then, opening/reading in/printing values from that external data file/closing the file. -using fixed length strings/together with dot notation -etc. I will leave it up to you to go and discover how to use such further possibilities; and, more... CONCLUSION As you can see from the above code examples/suggestions; QBASIC, is a very highly versatile programming language; which, quite often, gives programmers multiple different ways to write their underlying 'source code'...though, each differently written program will produce exactly the same surface 'output'.


How do you check a prime number in qbasic?

Cls input "enter the no. You want to check", a if a <=0 then print "only natural nos allowed" if a <=0 end let m = a - 1 for i = m to 2 step -1 if a mod i = 0 then print "not prime" if a mod i = 0 then end next i print "prime" end