Answers for "sqrt cpp"

C++
17

sqrt in c++

#include <cmath>
sqrt(x);
Posted by: Guest on June-20-2020
4

sqrt cpp

#include <math.h>

//get square root of a number "b"
int main(){
  	int a = 2; //declare number you want to take square root of
  	int sqrtNum = sqrt (a); //assign the sqrt value to a variable
  	cout << sqrtNum << endl;
	return 0;
}
Posted by: Guest on June-19-2020
1

square root c++

#include <stdlib.h>
#include <stdio.h>
#include <math.h>

/*
square root of a number
*/

int main(){
float num, raiz;
printf("enter a number: \t");
scanf("%f",&num);
raiz = sqrt(num);
printf("The square root of %f is: %f.\n", num, raiz);
system("pause");
return 0;    
}
Posted by: Guest on April-16-2021
0

sqrt in c++

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
	int x = 625;
	int result = sqrt(x);
	cout << "Square root of " << x << " is " << result << endl;
	return 0;
}
Posted by: Guest on June-05-2021
1

c sqrt

double sqrt(double arg);
Posted by: Guest on May-14-2020

Browse Popular Code Answers by Language