Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /*
- * File: main.cpp
- * Author: Tomek
- *
- * Created on 20 października 2016, 18:03
- */
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- class ulamek
- {
- int licznik, mianownik;
- public:
- inline ulamek(int l = 1, int m = 1){
- licznik = l;
- mianownik = m;
- }
- wyswietl();
- };
- /*
- *
- */
- int main(int argc, char** argv) {
- ulamek u1;
- ulamek u2(1,4);
- u2.wyswietl();
- u1.wyswietl();
- return 0;
- }
- ulamek::wyswietl()
- {
- cout<<licznik<<"/"<<mianownik<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement