Computer Science, asked by ia1495137gmailcom, 1 year ago

Correct the
eoors in the given
Program
2. class Square
public static void main(String args[])
int n=289,r:
r=sqrt(n);
if(n==r)
System.out.println("Perfect Square");
else
System.out.println("Not a Perfect Square");​

Answers

Answered by animesh6219
3

Answer:

r =sqrt(n); // error: incompatible data type. Can't assign float to int.

Answered by kavitatamta
2

Hope it helps you.Sorry if I am late.Please mark me as brainlist.

Attachments:
Similar questions