Write a program that asks marks in any subject and display the message "Result pass" if the input number is greater than 40
CLS
INPUT " enter marks in computer ";c
IF c>= 40 THEN PRINT "Result pass"ELSE PRINT"Result fail"
END
Write a program that asks any two number and display the one
CLS
INPUT"enter first number":a
INPUT"enter second number";b
If a>b THEN
PRINT "the greater number is ": a
ELSE
PRINT" the greater number is";b
END if
END
Write a program that checks whether the supplied number is even or odd
CLS
INPUT"enter any number":n
If n mod 2=0 THEN
PRINT " even number"
ELSE
PRINT " odd number"
END IF
END
Write a program that checks your age and tells whether you are eligible
CLS
INPUT"ENTER your age":a
IF a>=18 THEN
PRINT " you are eligible to vote"
ELSE
PRINT" your are not eligible to vote"
END IF
END
Write a program using for _NEXT statement to print natural number up to 15.
CLS
For i= 1 to 15
PRINT i
NEXT i
END
Write a program using for NEXT statement to PRINT even number 2 to 20
CLS
For i = 2 to 20 step 2
PRINT i
NEXT i
END
Write a program using DO WHILE ................. LOOP statement to generate numbers: 2,5,8,11,......32.
CLS
For i = 2 to 32 step 3
PRINT i
NEXT i
END
Write a program using WHILE......WEND statement to print first 10 odd number.
CLS
For i = 1 to 20 step 2
PRINT i
NEXT i
END
Write a program to PRINT number; 100,95,90.........5 using any one of looping structure.
CLS
For i = 100 to step-5
PRINT i
NEXT i
END
Write a program to print sum of even number from 2 to 10 using any one looping structures.
CLS
For i= 1 to 15
S= s+1
NEXT I
PRINT " sum";s
END
Write a program to Print sum of odd numbers between 1 to 21 using any one looping structure.
CLS
For i = 1 to 21 step 2
S= s+1
NEXT i
PRINT "sum";s
END
Write a program to print even number from 20 to 40
CLS
For i = 20 to 40 step 2
PRINT i
Next i
END
Write a program to find product of first ten natural number
CLS
P = 1
For i = 1 to 10
P= P*I
NEXT i
PRINT "Product ";P
END
Write a program to generate multiplication table of input number.
CLS
INPUT "enter any number";n
FOR i= 1 to 10
PRINT n;"x";i;"="n*1
NEXT i
END
CLS
INPUT " enter marks in computer ";c
IF c>= 40 THEN PRINT "Result pass"ELSE PRINT"Result fail"
END
Write a program that asks any two number and display the one
CLS
INPUT"enter first number":a
INPUT"enter second number";b
If a>b THEN
PRINT "the greater number is ": a
ELSE
PRINT" the greater number is";b
END if
END
Write a program that checks whether the supplied number is even or odd
CLS
INPUT"enter any number":n
If n mod 2=0 THEN
PRINT " even number"
ELSE
PRINT " odd number"
END IF
END
Write a program that checks your age and tells whether you are eligible
CLS
INPUT"ENTER your age":a
IF a>=18 THEN
PRINT " you are eligible to vote"
ELSE
PRINT" your are not eligible to vote"
END IF
END
Write a program using for _NEXT statement to print natural number up to 15.
CLS
For i= 1 to 15
PRINT i
NEXT i
END
Write a program using for NEXT statement to PRINT even number 2 to 20
CLS
For i = 2 to 20 step 2
PRINT i
NEXT i
END
Write a program using DO WHILE ................. LOOP statement to generate numbers: 2,5,8,11,......32.
CLS
For i = 2 to 32 step 3
PRINT i
NEXT i
END
Write a program using WHILE......WEND statement to print first 10 odd number.
CLS
For i = 1 to 20 step 2
PRINT i
NEXT i
END
Write a program to PRINT number; 100,95,90.........5 using any one of looping structure.
CLS
For i = 100 to step-5
PRINT i
NEXT i
END
Write a program to print sum of even number from 2 to 10 using any one looping structures.
CLS
For i= 1 to 15
S= s+1
NEXT I
PRINT " sum";s
END
Write a program to Print sum of odd numbers between 1 to 21 using any one looping structure.
CLS
For i = 1 to 21 step 2
S= s+1
NEXT i
PRINT "sum";s
END
Write a program to print even number from 20 to 40
CLS
For i = 20 to 40 step 2
PRINT i
Next i
END
Write a program to find product of first ten natural number
CLS
P = 1
For i = 1 to 10
P= P*I
NEXT i
PRINT "Product ";P
END
Write a program to generate multiplication table of input number.
CLS
INPUT "enter any number";n
FOR i= 1 to 10
PRINT n;"x";i;"="n*1
NEXT i
END
THANK YOU
Comments
Post a Comment