There are multiple ways to generate that particular string, several more than can be listed in one answer. For example:
CLS
PRINT "1 3 5"
or
CLS
REM An easy "1 through 5, odds only" FOR loop.
FOR X = 1 TO 5 STEP 2
PRINT X;
NEXT X
or even
CLS
INPUT "Please type in a number series with no line breaks (spaces okay):", numbers$
PRINT numbers$
REMPATTERNS (not necessary) CLS FOR I = 1 TO 5 STEP +1 FOR J = 1 TO I STEP+1 PRINT J NEXT J PRINT NEXT I END Hope you find this helpful :)
cls a =1 for i = 1 to 5 print a; a = (a*10)+1 next i end
QBASIC CODE/START... ==== ...QBASIC CODE/END.
CLS a = 0 b = 0 FOR i = 1 TO 10 IF a = 0 THEN f = 1 END IF PRINT f b = a a = f f = a + b NEXT i END from : Parth jani parthjani7@yahoo.com
//WAP to print fibonacci series using do-while loop.? using System; class Fibonacci { public static void Main() { int a=1,b=1; int sum=0; Console.Write("Enter Limit:"); int n=Int32.Parse(Console.ReadLine()); Console.Write(a); Console.Write(b); do { sum=a+b; a=b; b=sum; Console.Write(sum); } while(sum<n); } } By-Vivek Kumar Keshari
REMPATTERNS (not necessary) CLS FOR I = 1 TO 5 STEP +1 FOR J = 1 TO I STEP+1 PRINT J NEXT J PRINT NEXT I END Hope you find this helpful :)
the next one is 1234
cls a =1 for i = 1 to 5 print a; a = (a*10)+1 next i end
cls input "enter a name"; a$ b=1 while b <=1 print a$ b = b+1 wend end
QBASIC CODE/START... ==== ...QBASIC CODE/END.
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 can search for QBasic textbooks on online marketplaces like Amazon or eBay. Additionally, you can check with local libraries, bookstores, or educational institutions that may carry textbooks on programming languages. Also, there are many resources available online for free that can help you learn QBasic.
CLS a = 0 b = 0 FOR i = 1 TO 10 IF a = 0 THEN f = 1 END IF PRINT f b = a a = f f = a + b NEXT i END from : Parth jani parthjani7@yahoo.com
//to generate Fibonacci series upto a range of 200....(in C).... #include<stdio.h> main() { int a,b,c,i; a=0; b=1; printf("\n FIBONACCI SERIES .....\t"); i=1; while(i<=(200-2)) { c=a+b; printf("\t%d",c); a=b; b=c; i++; } }
the next no. in the series should be 19 so if we sum up the digits of 739 we get 19.
21 - 34 - 55 - 89... Simply add the 2 previous numbers together to get the next in the series. 1+1=2 1+2=3 2+3=5
//WAP to print fibonacci series using do-while loop.? using System; class Fibonacci { public static void Main() { int a=1,b=1; int sum=0; Console.Write("Enter Limit:"); int n=Int32.Parse(Console.ReadLine()); Console.Write(a); Console.Write(b); do { sum=a+b; a=b; b=sum; Console.Write(sum); } while(sum<n); } } By-Vivek Kumar Keshari