• + 0 comments

    ****Solution for java

    since variable int is used,so on checking num variable,it should also be checked in integer type variable,so as on dividing we get some decimal value,i.e. ,an error.

    ****So,check if(num==val*val)