66 819
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #36497 in C++ for Gs

Question #36497
Can anyone tell me the error and its correction

#include<iostream.h>
#include<conio.h>

int sqr(int num , int div);
int main()
{
int num;
cout<<"enter ";
cin>>num;
int div = num;
int sqrt;
sqrt=sqr(num,div) ;
cout<<sqrt<<endl;
return 0;
}


if(div==1)
{
return 1;
}

else
{
if((num/(div*div))%1!=0)
{
div=sqr(num,div-1);
}

if((num/(div*div))%1==0)
{
return div;
}
}
Expert's answer

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions