answersLogoWhite

0


Best Answer

PRINT 2,3,5,7,11,13,17,19,23,29,31,37

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What BASIC program can compute and display all prime numbers from 1 to 40?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you prepare a program in basic to display the word and the number of letters in it when is given as input?

10 cls 20 input"enter word";word$ 30 print word$ 40 print len(word$) 50 end this program is for GW BASIC for other BASIC's the line numbers are optional.


How do you write a program to find out the square and cube of first ten natural numbers in gw basic?

First you will need to have some basic programming knowledge. You can use this to help make the program that is needed.


Program to print all the even numbers of an array in visual basic?

find even number in array


How do you write a program in Basic to display all the even numbers up to 100?

In visual basic: Module Module1 Sub Main() Dim Inst As Integer For Inst = 0 To 100 Step 2 Console.WriteLine(Inst) Next End Sub End Module


How do you compute Community Tax in the Philippines?

To compute the community tax, you will need the basic community tax that should be applied based on income. As of 2013, the minimum basic community tax is five pesos for individuals, and five hundred pesos for corporations.


C program for sorting the numbers?

C program for sorting the numbers is very basic, start writing it and if you are having problems, post your program here and a description of the problem and you will be helped. If you are taking a computer course, how do you expect to pass exams if you have plagiarized someone else work for your assignments.


What has the author John Smiley written?

John Smiley has written: 'Learn to Program Databases With Visual Basic (Learn to Program)' 'Learn to Program Visual Basic Objects (Learn to Program)' 'Learn to Program with Visual Basic 6' -- subject(s): BASIC (Computer program language), Microsoft Visual BASIC, Visual Basic (Computer program), Visual programming (Computer science), Windows (Computer programs) 'Learn to Program Visual Basic 6 Examples' 'Introduction to Programming with Visual Basic 6 Part 2' 'Learn to Program Visual Basic Examples (Miscellaneous)' -- subject(s): Microsoft Visual Basic for Windows, BASIC (Computer program language)


How do you write a do while loop in visual basic to display the produc of even numbers between 1 and 10?

i=0 do if(i/2=0) msgbox(i) while(i<=10) wend


C program to print numbers 1 to n?

how do we use loops in c plus plus programing and what are basic differences between do,for and while loop


What are the basic components of a program?

The main 2 components of any program in general are... 1> Program code (any programming language) 2> Data (numbers/text/graphics) The programming language uses code to manipulate: store/calculate/interrogate/display the data. The data could, in fact, be located anywhere... -inside of the program's own 'internal' structure such as: data statements/array structure/variables list/-etc. -or else, inside of an 'external' database file: (.txt)/(.dat)/(.csv)/-etc.


What are the basic rules for crt display screens?

plz tell me


What number on the pH scale are basic?

The numbers 7.1 through 14 are the basic numbers.