Where is the problem in my code Strange root?
In Strange root challenge,when I input 7 the output should true. but it show false. I can't fix this. Someone help plz. As I used array first time. #include <stdio.h> #include<math.h> int times(int n); int main() { int n,s,p,r,i,r1,r2,z,m; double st,d; scanf("%d",&n); printf ("Input: %d",n); s=n*n; st=sqrt(n); printf ("\nSquare: %d",s); int intpart=(int)st; double decpart=st-intpart; d=decpart*1000; int intpart2=(int)d; p=intpart2; i=100; do { r=p%i; i/=10; if(r==0) p/=10; else continue; }while(r==0); printf ("\nSquared first 3 digit: %d",p); m=times(p); z=times(s); int sq[z],sqt[m]; do { r2=s%10; scanf("%d",&sq[r2]); s/=10; }while(s>0); do { r1=p%10; scanf("%d",&sqt[r1]); p/=10; }while(p>0); if(sq[r1]!=sqt[r2]) printf("\nNo strange https://code.sololearn.com/cfriNFAXiZT7/?ref=app