CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 10:04:09 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=b87d7ad4d2ac45003a42dd54079971ffc3d969fb23cd5e6a10e2d4b5e7eccb5aa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22NVcTybsWInxp54Tt5PmJP30xJRgM8q5H%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d5c57f6c9a0bc9-BLR
#include <iostream>#include <iomanip>#include "frac.h"int main() { - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include "frac.h"
- int main() {
- Fraction frac;
- std::string command;
- std::cin >> frac;
- while (std::cin >> command) {
- if (command == "+") {
- Fraction other;
- std::cin >> other;
- frac = frac + other;
- }
- else if (command == "-") {
- Fraction other;
- std::cin >> other;
- frac = frac - other;
- }
- else if (command == "*") {
- Fraction other;
- std::cin >> other;
- frac = frac * other;
- }
- else if (command == "/") {
- Fraction other;
- std::cin >> other;
- frac = frac / other;
- }
- else if (command == "+=") {
- Fraction other;
- std::cin >> other;
- frac += other;
- }
- else if (command == "-=") {
- Fraction other;
- std::cin >> other;
- frac -= other;
- }
- else if (command == "*=") {
- Fraction other;
- std::cin >> other;
- frac *= other;
- }
- else if (command == "/=") {
- Fraction other;
- std::cin >> other;
- frac /= other;
- }
- else if (command == "=") {
- Fraction other;
- std::cin >> other;
- frac = other;
- }
- else if (command == "show" || command == "print") {
- std::cout << frac << '\n';
- }
- else if (command == "double") {
- std::cout << std::fixed << std::setprecision(6) << static_cast<double>(frac) << '\n';
- }
- else if (command == "exit" || command == "quit") {
- break;
- }
- }
- std::cout << (frac < Fraction(1)) << '\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Exploit 500$ in 15 Minutes⭐⭐
Java | 4 sec ago | 0.10 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ 9
JavaScript | 4 sec ago | 0.25 KB
-
⭐⭐⭐Make $15OO in 2O minutesV G⭐⭐
Java | 10 sec ago | 0.10 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ D
JavaScript | 13 sec ago | 0.25 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 17 sec ago | 0.10 KB
-
📌 Swapzone +37% glitch ⭐ Y
JavaScript | 22 sec ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit T 3⭐⭐
Java | 22 sec ago | 0.10 KB
-
⭐⭐⭐Exchange Exploit T 3⭐⭐
Java | 28 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand