Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

sqrt function in c++

#include <iostream>
#include<math.h>
using namespace std;
int main(){
    int num, result;
    cout<<"Enter a number: ";
    cin>>num;
    
    result = sqrt(num);
    
    cout<<"Square root = "<<result;
    return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #sqrt #function
ADD COMMENT
Topic
Name
4+3 =