Computer Science, asked by Horizons9773, 8 months ago

Write a program to input the side of square and find its diagonal.

Answers

Answered by ajay200413
0

Answer:

Diagonal of the square is a×root3

Answered by syedashiq2005
0

Answer:

I dont know which programming language you are talking about but i will give you the code for C++ and Qbasic

Explanation:

C++:

#include < stdio.h >

int main()

{

float area, diagonal;

printf("Enter length of diagonal of a Square\n");

scanf("%f", &diagonal);

area = (diagonal * diagonal) * 0.5;

printf("Area of the Square is %0.2f\n", area);

return 0;

}

Qbasic:

CLS

INPUT “ENTER LENGTH”; L

INPUT “ENTER BREADTH”; B

A = L * B

PRINT “AREA OF RECTANGLE ”; A

END

Please mark me brainliest!

Similar questions