1 CLS
2 PRINT "Please to tell me the length of the side of the square."
3 INPUT S
4 PRINT
5 PRINT "The perimeter of the square is "; 4 * S
6 PRINT
7 PRINT "The area of the square is "; S ^ 2
8 PRINT
9 PRINT "That was truly a total blast. Would you like to play again ? 'Y' or 'N' ."
10 INPUT A$
11 IF A$ = "Y" or A$ = "y" then PRINT "Goody! " : GOTO 2
12 IF A$ = "N" or A$ = "n" then PRINT "Well OK then. Goodbye": END
13 PRINT: PRINT "Please to type a 'Y' to play again, or a 'N' to quit for now."
14 GOTO 10
PRINT "Give me the rectangle's length.": Input L PRINT "Give me the rectangle's width.": Input W PRINT "The rectangle's area is "; L x W PRINT "The rectangle's perimeter is "; 2 x (L + W) PRINT "You've been a great audience. I'm here til Thursday. Don't forget to tip your waiter. Have a nice day."
cls input "enter a no"; num if num mod 14= num then print "no is divisible" else print "not divisible" end if end
You can create a simple program in Python to achieve this. The program will prompt the user to input two numbers, calculate their product, and then check if the product is equal to or greater than 1000. If it is, the program will print a message confirming that; otherwise, it will indicate that the product is less than 1000. Here's a quick example: num1 = float(input("Enter the first number: ")) num2 = float(input("Enter the second number: ")) if num1 * num2 >= 1000: print("The product is equal to or greater than 1000.") else: print("The product is less than 1000.")
In BASIC: 10 INPUT X: IF X = 999 THEN STOP ELSE PRINT X; 20 IF X/2 = INT(X/2) THEN PRINT "EVEN" ELSE PRINT "ODD" 30 GOTO 10
Area of any circle = pi*radius squared
PRINT "Give me the rectangle's length.": Input L PRINT "Give me the rectangle's width.": Input W PRINT "The rectangle's area is "; L x W PRINT "The rectangle's perimeter is "; 2 x (L + W) PRINT "You've been a great audience. I'm here til Thursday. Don't forget to tip your waiter. Have a nice day."
Input "enter name" ;n$ input "enter marks" ; m ifm > 40 then print n$, "pass" else print n$, "fail"
Starts Input a,b Result=(a-b)*(a-b) Print"square of difference=",result
cls input "enter a no"; num if num mod 14= num then print "no is divisible" else print "not divisible" end if end
CLS PRINT "PROGRAM: Calculate both perimeter/area of rectangle" PRINT INPUT " Length"; length INPUT "Breadth"; breadth PRINT PRINT "Perimeter: "; 2 * (length + breadth) PRINT " Area: "; length * breadth END
hhh
(ab)*b
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
vowels$ = "aeiou" CLS PRINT "PROGRAM: Find if letter is a vowel or not" PRINT INPUT "Type a single alphabet letter: (a-z)/and, then, press Enter key"; aLetter$ PRINT PRINT "Letter "; aLetter$; IF INSTR(vowels$, LCASE$(aLetter$)) THEN PRINT " is a vowel." ELSE PRINT " is NOT a vowel." END
10 cls 20 input"enter word";word$ 30 print word$ 40 print len(word$) 50 end this program is for GW BASIC for other BASIC's the line numbers are optional.
input price calc tip = price*0.15 print tip
a triangle then a square :)