Skip to main content

Example of Backward jump in GW basic Q Basic / write a program to print the series of 1,4,9,16,25,36,49,........

10 let x=1
20 let =x*x
30 print y
40 let x=x+1
50 goto 20
60 end



--------------------------Output-----------------------------------
1
4
9
16
25
36
49

break in 30

Comments

Popular posts from this blog

Class x_ Blue j java question solve(Important)

Section – A Answer any four of the following : 1 . Write a Program to calculate charges for sending particles when the charges are as follows For the first 1KG  Rs.15.00  , For additional weight , for every 500gm or fraction thereof: Rs 8.00 Ans class Prog1 { static void test(double wt)//user enters the weight in KGs { System.out.println(“Parcel  Weight is “+wt); int icharge = 15; System.out.println(“Initial  charge is “+icharge); int rwt = (int)((wt-1)*1000); System.out.println(“Remaining  weight after deducing 1Kg “+rwt); int rcharge = (rwt/500)*8; System.out.println(“Charge  excluding fractional part is Rs.”+(icharge+rcharge)); int fcharge = (rwt%500>0)?8:0; System.out.println(“Charge  for fractional part is Rs. “+fcharge); int tcharge = icharge+rcharge+fcharge; System.out.println(“Total  Charge is Rs. “+tcharge); } } 2 . A special two-digit number is such that when the sum of its digits is added to the product of its digits , the res...