fork download
  1. #include <stdio.h>
  2. #include<math.h>
  3.  
  4. int main(void) {
  5. int n;
  6. printf("Enter the number: ");
  7. scanf("%d",&n);
  8.  
  9. int root=sqrt(n);
  10. printf("The root is %d",root);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5312KB
stdin
6
stdout
Enter the number: The root is 2