Computer Science, asked by meenal0314, 7 months ago

Write a program to print the area of square.
(Hint area of square
square = side * side)​

Answers

Answered by manavpaul27
0

Answer:

#include <stdio.h>

int main()

{

int s=13;

int area_square=s*s;

printf("Area of the square=%d",area_square);

}

Explanation:

Hope this helps

Answered by SƬᏗᏒᏇᏗƦƦᎥᎧƦ
20

public class PerimeterAndAreaOfSquare

{

public static void main (String Args[ ])

{

int side = 5;

int area , perimeter;

perimeter= 4*side ;

area = side*side;

System.out.println("Side of the square is:\

t" + side + " cm ");

System.out.println("Perimeter of the square is:\t" + perimeter + " meter " );

System.out.println("Area of the square is:\t" + area + "square cm");

}

}

Output

Side of the square is :5cm

Perimeter of the square is: 20meter

Area of the square is: 25 square cm

Similar questions