Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Fraction.h"
- int main() {
- //Du må legge til en linje her. Du velger hva som står der. Hint: Vectoren.
- for (int x = 0; x < 10, x++) {
- for (int y = 10; y > 0; y--) {
- Fraction tmp(x, y);
- fracs.push_back(tmp);
- }
- }
- cout << fracs;
- Fraction f1(1, 2);
- Fraction f2(2, 9);
- Fraction f3(2, 4);
- if (f1 < f2) {
- cout << f1 << " er minst " << endl;
- }
- else if (f1 == f2) {
- cout << "de er like " << endl;
- }
- else {
- cout << f2 << "er minst ";
- }
- if (f1 < 4) {
- f1 = f1 + f2;
- cout << f1 << endl;
- }
- f2 = f2 + 5;
- cout << f2 << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement