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
3
Answer:
r =sqrt(n); // error: incompatible data type. Can't assign float to int.
Answered by
2
Hope it helps you.Sorry if I am late.Please mark me as brainlist.
Attachments:
Similar questions