Hi Mikrom,
This QBASIC program searches for the kth Prime Number and prints the Prime Number and k value.
I have tested it on a site for checking Primes.
Is there any way I can speed up the processing time?
Your help appreciated.
pa99
Hi Mikrom,
After a long time I am trying to code with Subroutines.
I get Error: Label Not Defined on Line 145 but not on 95.
Why should this be?
And what is the error trying to tell me?
And how do I get rid of it?
Thanx for your help...
Hi Mikrom,
I am writing a simple Temperature conversion QBASIC Program for my grandson.
Psuedo code looks like this
INPUT T$
IF T$ C F K
Depending on whether input is C F or K
I will use a GOTO to carry out different calculations
I am trying to avoid multiple IF statements and would like to...
Writing a simple program which I will tidy up later but I need to resolve this Error.
Please help.
pa99https://files.engineering.com/getfile.aspx?folder=131b8266-c764-4ae2-bb74-d7d57165949b&file=QBASIC_Error.JPG
Hi Mikrom,
Your help appreciated please.
I keep getting a TYPE MISMATCH Error on Line 14 ( Line No 240)
Can you help please.
100 REM 6N +- 1 Test V15.3
110 DIM P1 AS LONG
115 DIM P2 AS LONG
120 DIM N1 AS LONG
125 DIM N2 AS LONG
130 INPUT “Number “; N
140 IF N <= 0 THEN GOTO...
Has anyone written a code in QBasic to solve the Travelling Salesman Problem?
I can solve it in Excel Solver but would be interested in the code.
Pervezhttps://files.engineering.com/getfile.aspx?folder=855c4bc6-288a-40e1-b531-4633fbe519ff&file=TSP_-_SOLVER_v1.xlsx
Folks,
I am trying to generate Mill's Primes and the code is very simple.
For K = 1 and 2, the program gives the correct answers of 2 and 11.
But, for K = 3 it gives 1359 with the M value specified.
According to the maths (and Excel), the correct answer should be 1361 - the 3rd Mill's Prime...
Hi,
I have the foll 3 lines in a QBASIC code.
Is there a way of combining all 3 lines or at least combine into 2 lines?
IF 2^K = N GOTO 100
IF 2^K < N GOTO 110
IF 2^K > N GOTO 120
Thanx
pya
I generate Prime Numbers upto 1000 and output them to a file.
But they print in long column.
I want to print them in an array.
Example
2 3 5 7 11 13
17 19 23 29 31
37 41
Can someone please help?
Thanx
I have written a simple QBASI program that checks if a number is Prime.
But the program cannot handle numbers larger than 16 digits.
Is there a way I can use QBASI to check for Primes greater than 16 digits long?
My program below:
10 REM Prime Tester 7B
20 COLOR 15, 0, 0
30 DIM P AS _FLOAT
40...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.