Write a program to input the side of square and find its diagonal.
Answers
Answered by
0
Answer:
Diagonal of the square is a×root3
Answered by
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
Math,
4 months ago
English,
4 months ago
Computer Science,
4 months ago
Geography,
8 months ago
World Languages,
1 year ago
Math,
1 year ago