Advertisement
murad45

task for multi variable

Nov 11th, 2021 (edited)
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int AnyNUm;
  9.    
  10.     std::cout << "Enter any number to square root: " << std::endl;
  11.     std::cin >> AnyNUm;
  12.    
  13.     double root = sqrt(AnyNUm);
  14.     root = round(root * 1000)/1000;
  15.    
  16.     std::cout <<"Root: " << root << std::endl;
  17.  
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement