Thursday, August 24, 2017

project work of computer

1) Write a program that asks mark 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 "RESULT PASS"
ELSE PRINT "RESULT FAIL"
END IF END

2) Write a program that asks any two number and display the greater.
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

3) Write a program that checks weather the supplied number is even or odd.
CLS
INPUT "ENTER ANY NUMBER";N
IF N MOD=0 THEN
PRINT "ENTER NUMBER"
ELSE
PRINT "ODD NUMBER"
END IF
END

4) Write a program that asks two numbers and display the difference between grester and smaller number.
CLS
INPUT "ENTER FIRST NUMBER";A
INPUT "ENTER SECOND NUMBER";B
IF A>B THEN
D = A-B
ELSE
D = B-A
END IF
PRINT "DIFFERENCE OF GREATER AND SMALLER NUMBER=";D
END

5) Write a program that asks your age and tell weather you are eligible to vote or not.
CLS
INPUT "ENTER YOUR AGE";A
IF A > = 18 THEN
PRINT "YOU ARE ELIGIBLE TO VOTE"
ELSE
PRINT "YOU ARE NOT ELIGIBLE TO VOTE"
END IF
END

6) Write a program to print the smaller number among 3 input number.
CLS
INPUT "ENTER ANY THREE NUMBER";A,B,C
IF A <B AND A<C THEN
PRINT "THE SMALLEST NUMBER IS";A
ELSE IF B<A AND B<C THEN
PRINT "THE SMALLEST NUMBER IS";B
ELSE
PRINT "THE SMALLEST NUMBER IS";C
END IF
END

7) Write a program that asks marks in 3 difference subject and display message pass or fail.
CLS
INPUT "ENTER MARKS IN THREE SUBJECT";A,B,C
IF A > = 40 AND B > = 40 AND C > = 40 THEN
PRINT "YOU ARE PASS"
ELSE
PRINT "YOU ARE FAIL"
END IF
END

8) Write a program using for ..... NEXT statement to print natural numbers up to 15.
CLS
FOR I = 1 TO 15
PRINT I
NEXT I
END

9) Write a program using for....NEXT statement to print even number from 2 to 20.
CLS
FOR I =2 TO 20 STEP 2
PRINT I
NEXT I
END

10) 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

11) 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

12) WRITE A PROGRAM TO PRINT NUMBER:100,95,90,.......5 using any one of the looping structures.
CLS
FOR I = 100 TO 5 STEP -5
PRINT I
NEXT I
END

13) Write a program to print sum of first 15 natural numbers using anu one of the looping structures.
CLS
FOR I = 1 TO 15
S = S + I
NEXT I
PRINT "SUM=";S
END

14) Write a program to print sum of even numbers from 2 to 10 using any one of the looping structures.
CLS
FOR I = 2 TO 10 STEP 2
S = S + I
NEXT I
PRINT "SUM=";S
END

15) Write a program to print sum of odd numbers between 1 to 21 using any one of the looping structures.
CLS
FOR I =1 TO 21 STEP 2
S = S + I
NEXT I
PRINT "SUM=";S
END

16) Write a program to print even number 20 + 40.
CLS
FOR I = 20 TO 40 STEP 2
PRINT I
NEXT I
END

17) Write a program to find product of first ten natural number.
CLS
P = 1
FOR I = 1 TO 10
P = P * 1
NEXT I
PRINT "PRODUCT=";P
END

18) 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

19) Write a program to print numbers 1,8,27,.......1000.
CLS
FOR I = 1 TO 10
PRINT I = 1 TO 10
PRINT I^3
NEXT I
END










No comments:

Post a Comment

My journey of Jagat Mandir School

13 Years of ExperiencE It is also said that school is next home of every child. "failing and learning" Teacher are like gods....