Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- #include "USEFUL_FUNCTIONS.h"
- using namespace std;
- int main()
- {
- float input;
- float result;
- bool gettingResult = false;
- bool console_still_going = true;
- float iterator_ = .00001;
- while (console_still_going)
- {
- cout << "Insert the number you want to get the square root of: " << endl;
- cin >> input;
- while (!gettingResult)
- {
- result = iterator_ * iterator_;
- if (result > input)
- {
- gettingResult = true;
- }
- cout << iterator_ << endl;
- iterator_ += .01;
- }
- cout << "Square root of " << input << " = " << iterator_ << endl;
- iterator_ = .01;
- gettingResult = false;
- }
- int pause; cin >> pause;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement