CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 01:25:03 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=e66fd99301693cabc005cdebef92de196357f1c6420f010d6719253085d4e058a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22yk43dH9OpVxdDN8isvaenbo5bvGt2bk6%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d2cd13785f8e4d-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
-
π Swapzone +37% glitch β W
JavaScript | 1 sec ago | 0.25 KB
-
π Exchange profit method
JavaScript | 4 sec ago | 0.24 KB
-
β
β Make huge profits on trading ββ P
JavaScript | 10 sec ago | 0.25 KB
-
β Free Crypto Method β
JavaScript | 14 sec ago | 0.24 KB
-
ββ
Marketplace Glitch β
Working β
NEVER SEEN...
JavaScript | 18 sec ago | 0.25 KB
-
π Crypto Swap Glitch β
Working
JavaScript | 24 sec ago | 0.24 KB
-
ββ
Exploit 2500$ in 15 Minutesβββ E
JavaScript | 28 sec ago | 0.25 KB
-
π EASY MONEY GUIDE β
Working
JavaScript | 33 sec ago | 0.24 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