ahmed0saber

Calculate square root in C++

Nov 4th, 2020
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std ;
  4. int main()
  5. {
  6.     float a ;
  7.     cout << "Enter a number" << endl ;
  8.     cin >> a;
  9.     cout << endl << "The square root of the number = " << sqrt(a);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment