Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cctype>
- #include <cmath>
- using namespace std;
- int main() {
- string str, number;
- getline(cin, str);
- for (int i = 0; str[i] != '.'; i++) {
- if (isdigit(str[i])) {
- number += str[i];
- }
- }
- cout << sqrt(stoi(number)) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement