Ayush+Kanthalia

 The programs are - Program to find the number is negetive or positive -

10 CLS 20 INPUT "ENTER A NUMBER (POSITIVE OR NEGETIVE):"; N 30 IF N < 0 THEN PRINT "THE NUMBER IS NEGETIVE" ELSE PRINT "THE NUMBER IS POSITIVE" 40 END

Program to show Greater number

10 INPUT "ENTER FIRST NUMBER:"; EFN 20 INPUT "ENTER SECOND NUMBER:"; ESN 30 IF EFN > ESN THEN PRINT "GREATER NUMBER:"; EFN 40 IF EFN < ESN THEN PRINT "GREATER NUMBER:"; ESN 50 END

Program to show the smaller number

10 CLS 20 INPUT "ENTER FIRST NUMBER:"; EFN 30 INPUT "ENTER SECOND NUMBER:"; ESN 40 IF EFN < ESN THEN PRINT "SMALLER NUMBER:"; EFN 50 IF EFN > ESN THEN PRINT "SMALLER NUMBER:"; ESN

Program to show the cube of any number

10 CLS 20 A = 1 30 COUNT = 1 40 B = A * A * A 50 PRINT B 60 A = A + 1 70 COUNT = COUNT + 1 80 IF COUNT <= 20 THEN GOTO 40 90 END

Program to calculate the average age of 5 employees

10 CLS 20 INPUT "ENTER THE AGE OF FIRST EMPLOYEE:"; F 30 INPUT "ENTER THE AGE OF SECOND EMPLOYEE:"; S 40 INPUT "ENTER THE AGE OF THIRD EMPLOYEE:"; T 50 INPUT "ENTER THE AGE OF FOURTH EMPLOYEE:"; FO 60 INPUT "ENTER THE AGE OF FIFTH EMPLOYEE:"; FI 70 SUM = (F + S + T + FO + FI) / 5 80 PRINT "AVERAGE AGE OF ALL EMPLOYEES:"; SUM; "YEARS" 90 END

Program to calculate the grade of a person

10 CLS 20 INPUT "ENTER YOUR MARKS:"; M 30 IF M < 70 THEN PRINT "YOUR GRADE: FAIL" 40 IF (M >= 70) AND (M < 75) THEN PRINT "YOUR GRADE: C" 50 IF (M >= 75) AND (M < 80) THEN PRINT "YOUR GRADE: C+" 60 IF (M >= 80) AND (M < 85) THEN PRINT "YOUR GRADE: B" 70 IF (M >= 85) AND (M < 90) THEN PRINT "YOUR GRADE: B+" 80 IF (M >= 90) AND (M < 95) THEN PRINT "YOUR GRADE: A" 90 IF (M >= 95) AND (M <= 100) THEN PRINT "YOUR GRADE: A+" 100 END

Program to calculate the area and perimeter of a rectangle or square -

10 CLS 20 INPUT "LENGHT (CM):"; L 30 INPUT "WIDTH (CM):"; W 40 PER = L + L + W + W 50 SUM = L * W 60 PRINT "PERIMETER:"; PER 70 PRINT "AREA:"; SUM 80 END

Program to calculate the area and perimeter of a triangle

10 CLS 20 INPUT "ENTER THE BASE OF THE TRIANGLE (IN CM):"; B 30 INPUT "ENTER HEIGHT OF THE TRIANGE (IN CM):"; H 40 ARE = (B / 2) * H 50 PRINT "AREA OF TRIANGLE:"; ARE; "CM'2" 60 INPUT "ENTER FIRST SIDE OF THE TRIANGLE (IN CM):"; S 70 INPUT "ENTER SECOND SIDE OF THE TRIANGLE (IN CM):"; F 80 INPUT "ENTER THIRD SIDE OF THE TRIANGLE (IN CM):"; C 90 PER = (S + F) + C 100 PRINT "PERIMETER OF TRIANGLE:"; PER; "CM" 110 END

Program to calculate the simple interest

10 CLS 20 INPUT "PRINCIPAL:"; PRI 30 INPUT "INTEREST RATE:"; IRA 40 INPUT "TIME:"; TIM 50 SUM = (PRI * IRA * TIM) / 100 60 PRINT "INTEREST:"; SUM 70 END

Program to calculate the percentage of your marks

10 CLS 20 REM PERCENTAGE PROGRAM 30 INPUT "TOTAL MARKS:"; TM 40 INPUT "MARKS OBTAINTED:"; M 50 SUM = (M / TM) * 100 60 PRINT "PERCENTAGE:"; SUM; "%" 70 END

Program to interchange 2 numbers value -

CLS INPUT "ENTER FIRST NUMBER:"; NO1 INPUT "ENTER SECOND NUMBER:"; NO2 NO3 = NO1 NO1 = NO2 NO2 = NO3 PRINT "THE VALUE OF THE FIRST NUMBER IS:"; NO1 PRINT "THE VALUE OF THE SECOND NUMBER IS:"; NO2

Program to calculate the sum and the product of two numbers -

CLS INPUT "ENTER FIRST NUMBER:"; NO1 INPUT "ENTER SECOND NUMBER:"; NO2 SUM = NO1 + NO2 PRO = NO1 * NO2 PRINT "THE SUM OF THE ENTERED NUMBERS IS:"; SUM PRINT "THE PRODUCT OF THE ENTERED NUMBER IS:"; PRO

Program calculate the days if the speed is 50km/h and the distance of 2800km -

CLS DIST = 2800 SPEE = 50 TIME = DIST / SPEE DAY = TIME / 24 PRINT "THE DISTANCE IS:"; DIST; "KM" PRINT "THE SPEED IS:"; SPEE; "KM/H" PRINT "THE TIME TRAVELLED IS:"; DAY; "DAYS"

Program to calculate the circumfrence oand the area of a circle -

CLS INPUT "ENTER THE RADIUS OF A CIRCLE:"; R AREA = (R * R) * 3.14 PRINT "THE AREA OF THE CIRCLE IS:"; AREA CIR = (R * R) * (3.14 * 3.14) PRINT "THE CIRCUMFERENCE OF THE CIRCLE IS:"; CIR

Program to print a item and its price in a tabular form -

CLS PRINT TAB(5); "ITEM", TAB(25); "PRICE" PRINT TAB(5); "COMPUTER", TAB(25); "RS. 30,000" PRINT TAB(5); "CYCLE", TAB(25); "RS. 25,000" PRINT TAB(5); "TUBE LIGHT", TAB(25); "RS. 400" PRINT TAB(5); "APPLE IPOD", TAB(25); "RS. 2,000" PRINT TAB(5); "SAMSUNG TOUCH", TAB(25); "RS. 30,000"

 Program to make a loop -

10 CLS 20 no1 = 2 30 no2 = 3 40 sum = 0 50 count = 1 60 PRINT no1 70 sum = no1 + no2 80 PRINT sum 90 no2 = no2 + 2 100 sum = sum + no2 110 count = count + 1 120 IF count < 10 THEN GOTO 80 130 END  Program to print area or perimeter depending upon a choice (1/2)- 

 CLS INPUT "Length (in cm):"; no1 INPUT "Width (in cm):"; no2 peri = no1 + no2 + no1 + no2 area = no1 * no2 INPUT "Enter a number (1 to print perimeter /2 to print area):"; num IF num = 1 THEN PRINT "Perimeter:"; peri ELSE PRINT "Area:"; area

Program to calculate the sum, subtraction, product and division by the user's choice -

CLS INPUT "Enter first number:"; num1 INPUT "Enter second number:"; num2 INPUT "Enter a symbol (+ or - or * or /):"; num$ IF num$ = "+" THEN PRINT "Sum of the two numbers is:"; num1 + num2 IF num$ = "-" THEN PRINT "Subtraction of the two numbers is:"; num1 - num2 IF num$ = "*" THEN PRINT "Product of the two numbers is:"; num1 * num2 IF num$ = "/" THEN PRINT "Division of the two numbers is:"; num1 / num2

 Ayush Kanthalia email-id - kanthalia.choithram@gmail.com Grade - VI B (MYP 1)