-8

please help. what is the syntax to write the square root of the following √4*3.142*A in c plus plus programming language. A is a variable.

2 Answers2

4

you can easily use sqrt(4*3.142*A) but don't forget to add this first #include<cmath>

Andrew Meleka
  • 93
  • 1
  • 10
0
****we have function for sqrt provided in math library.****
#include <iostream>
#include<math.h>

using namespace std;


int main()
{
// √4*3.142*A
    int A =10;
    float result = sqrt(4*3.14*A);
    cout<<result<<endl;
 }

result==11.2071

Ccr
  • 686
  • 7
  • 25