Computer Science, asked by vijay4574, 1 year ago

write a program to find area of square

Answers

Answered by marpitasrao
2

#include<iostream.h>

#include<conio.h>

void main()

{ int s;

cout<<"Enter side of the square:";

cin>>s;

cout<<"Area of square is:"<<s*s;

getch();

}



vijay4574: help me
vijay4574: help
marpitasrao: what do u want help in buddy?
Answered by kushal454100
0

Answer:

import java.util.*;

class sq

{

   public static void main(String x[])

   {

       Scanner sc=new Scanner(System.in);

System.out.println("enter the side of the square to find the area");

double side=sc.nextInt();

double area=side*side;

System.out.println("the area of the square="+area);

}

}

Explanation:

output

enter the side of the square to find the area

5

the area of the square=25.0

Similar questions