“cmath sqrt” Kode Jawaban

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;
}
Wrong Wolf

cmath sqrt

/* sqrt example */
#include <stdio.h>      /* printf */
#include <math.h>       /* sqrt */

int main ()
{
  double param, result;
  param = 1024.0;
  result = sqrt (param);
  printf ("sqrt(%f) = %f\n", param, result );
  return 0;
}
Concerned Civet

Jawaban yang mirip dengan “cmath sqrt”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya