Posts

Showing posts from February, 2014

Questions collection Q BASIC Program

1)      Wap to check whether a number is armstrong or not. 2)      Wap to display reverse form of a input word. 3)      Wap to check whether a number is palindrome of not. 4)      Wap to print only the vowels for a given word. 5)      Wap to ask 2 numbers and find H.C.F. and L.C.M. of given number. 6)      Wap to check whether the first character of the word is capital, small or numerical. 7)      Wap to ask n numbers and display them in ascending order. 8)      Wap to enter full name and display the initials only. 9)      Wap to convert time in seconds into exact hours, minutes and seconds. 10)  Wap to convert binary into decimal. 11)  Wap to convert decimal no. into binary. 12)  Wap to  find factorial number. 13)  Wap to find a b  without using the exponent sign(^) 14)  Wap to input name and show in ascending order.

Most Probable SLC asked questions

1. Write a program to display all armstrong number from 1 to 2000 using FUNCTION...END FUNCTION. DECLARE FUNCTION display () CLS v = display END FUNCTION display FOR i = 1 TO 2000 N = i S = 0 WHILE N <> 0 R = N MOD 10 S = S + R ^ 3 N = N \ 10 WEND IF S = i THEN PRINT i, END IF NEXT i END FUNCTION 2. Write a program to check given input number is armstrong or not using FUNCTION...END FUNCTION. DECLARE FUNCTION armstrong$ (N) CLS INPUT "Enter a number"; N PRINT armstrong$(N) END FUNCTION armstrong$ (N) O = N WHILE N <> 0 R = N MOD 10 S = S + R ^ 3 N = N \ 10 WEND IF S = O THEN armstrong$ = STR$(O) + " is armstrong number" ELSE armstrong$ = STR$(O) + " is not armstrong number" END IF END FUNCTION