Code:
#include<iostream> using namespace std; int main() { double x,i; cout<<"Enter the value of the number\n"; cin>>x; for(i=0;i<x;i=i+0.1) { cout<<"value of i"<<i<<endl; double l=i*i; cout<<"value of square "<<l<<endl; if(x==l) break; } cout<<"the sqrt is "<<i; system("PAUSE"); return 0; }
Comment