practicing for my test tomorrow using this pythagoras calculator, however everytime the last one or two digits wouldnt round up properly
#include <stdio.h>
#include <math.h>
int main () {
int adj = 0;
int opp = 0;
double hyp = 0.0;
printf("Enter the length of the adjacent side: \n");
scanf("%d", &adj);
printf("Enter the length of the opposite side: \n\n");
scanf("%d", &opp);
hyp = sqrt(adj*adj + opp*opp);
printf("The hypotenuse is %.6f in length.\n\n", hyp);
printf(" +\n");
printf(" |\\\n");
printf(" | \\\n");
printf(" %.6f| \\ %.6f\n", (double)opp, hyp);
printf(" | \\\n");
printf(" | \\\n");
printf(" +-----+ \n");
printf(" %.6f\n", (double)adj);
printf("\nNote: Right-angle triangle is not drawn to scale!\n");
return 0;
}```