Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int AnyNUm;
- std::cout << "Enter any number to square root: " << std::endl;
- std::cin >> AnyNUm;
- double root = sqrt(AnyNUm);
- root = round(root * 1000)/1000;
- std::cout <<"Root: " << root << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement