Computer Science, asked by pujakahar, 10 months ago

write the coding to draw box in Q Basic window​

Answers

Answered by Tejaswanichandan
1

'This example requires a color graphics adapter.

SCREEN 1

Triangle$ = "F60 L120 E60"

DRAW "C2 X" + VARPTR$(Triangle$)

DRAW "BD30 P1,2 C3 M-30,-30"

Answered by ayushkothari922
1

I THINK THIS CODE WORK

Redo:

cls

screen 1

Input "Enter the X-position?";K

Input "Enter the Y-position?";L

color 1

for i = 1 to 50 step 2   rem box

   a = k+i:b = l+i

   line (a,a)-(b,a)

   line (a,b)-(b,b)

   line (a,a)-(a,b)

   line (b,a)-(b,b)

next                            rem diagonals

line (k,k)-(a,a)

line (l,l)-(b,b)

line (l,k)-(b,a)

line (k,l)-(a,b)

Input"Do you want to redo? (Y/N)";ans$

if ucase$(ans$)="Y" then goto Redo

end

Similar questions