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$
Chat with our AI personalities
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