I wrote this code, based on the Newton-Raphson method, to find the square root of a number. I'm wondering how I can optimise this code, as I am out of ideas.#include <stdio.h>int main(void){     float n, x, i;     printf(Enter the number you wish to find the square root of.\n);     printf(\n);     scanf(%f, &n);     x = n/2;     for (i = 0; i < 100; i++)         x = x - (((x*x) - n)/(2*x));     printf(The square root of %.0f is %.4f.\n, n, x);     return 0;}
Approximating the square root using an iterative method
optimization;c;floating point;numerical methods