Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: pya
  • Content: Threads
  • Order by date
  1. pya

    QBASIC Processing time

    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
  2. pya

    Label Not Defined ERROR

    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...
  3. pya

    Branching with Strings Input

    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...
  4. pya

    Name already in use ERROR

    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
  5. pya

    Data Type Mismatch in QBASIC

    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...
  6. pya

    Travelling Salesman Problem in QBasic

    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
  7. pya

    Error in Exponentiation

    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...
  8. pya

    Chopping a Number

    Folks, How do I chop and print a 6 digit number? If my number is 123456, I want to out put 12 or 34 or 56. Your help appreciated. Thanx pya
  9. pya

    Conditional IF statement

    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
  10. pya

    Number output printing in an Array

    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
  11. pya

    How do I display a clculation in st

    How do I display a calculation in standard ( non-scientific ) format? For example, 123456789123456789 * 100, I want displayed as 12345678912345678900
  12. pya

    How to handle large Primes ( longer than 16 digits ) ?

    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...

Part and Inventory Search

Back
Top