answersLogoWhite

0


Best Answer

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

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a program to input the side of a square and print its area and perimeter?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program that prompts the user to input the length and width of a rectangle and then prints the rectangle's area and perimeter?

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."


What is the program to input name and print pass or fail?

Input "enter name" ;n$ input "enter marks" ; m ifm > 40 then print n$, "pass" else print n$, "fail"


How do you write a program to find the area and perimeter of a rectangle?

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


Program to print no divisible by 7?

cls input "enter a no"; num if num mod 14= num then print "no is divisible" else print "not divisible" end if end


Write a Qbasic program to find the root of a quadratic equation using the formula if the result is less than 0 the program should print the root are immerginary and end the program?

(Uses Square Root Function) PRINT "Ax^2 + Bx + C = 0" INPUT "A = ", A INPUT "B = ", B INPUT "C = ", C D = B * B - 4 * A * C IF D > 0 THEN DS = SQR(D) PRINT "REAL ROOTS:", (-B - D) / (2 * A), (-B + D) / (2 * A) ELSE IF D = 0 THEN PRINT "DUPLICATE ROOT:", (-B) / (2 * A) ELSE DS = SQR(-D) PRINT "COMPLEX CONJUGATE ROOTS:", (-B / (2 * A)); "+/-"; DS / (2 * A); "i" END IF END IF


Write a program in 'C' language to accept 6 strings as input and print them in lexicographic?

(ab)*b


C program to print mark sheet of 5 subjects and the number of students is user input?

hhh


Write a java script program to print first ten odd natural numbers in C?

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.


How do you prepare a program in basic to display the word and the number of letters in it when is given as input?

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.


Write a program to print whether the letter is vowel or not in BASIC?

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


How do you write a pseudocode program that commutes and displays a 15 percent tip when you input the price of the meal?

input price calc tip = price*0.15 print tip


Write a program in qbasic to make a hut using print statemant?

a triangle then a square :)