Answer to Question #36497 in C++ for Gs
2013-10-24T05:13:01-04:00
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;
}
}
1
2013-11-01T06:05:04-0400
The answer to the question is available in the PDF file https://assignmentexpert.com/https://assignmentexpert.com/homework-answers/programming-answer-36497.pdf
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 !
Learn more about our help with Assignments:
C++
Comments
Leave a comment