Cpp Square Root Calculator
Analyze_
Posted on June 6, 2022
I like making calculators so I made one for square root. This uses the cmath package
#include <cmath>
#include <iostream>
using namespace std;
int main() {
string session = "y";
while (session == "y") {
int num = 0;
cout << "What would you like to find the quare root of?\n";
cin >> num;
cout << sqrt(num) << "\nWould you like to continue session [y/n]?\n";
cin >> session;
cout << "\x1B[2J\x1B[H";
} // end of session
cout << "\x1B[2J\x1B[H";
cout << "Ended session\n";
return 1;
} // end of code
💖 💪 🙅 🚩
Analyze_
Posted on June 6, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.