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 macierz
- {
- float a[3][3];
- public:
- macierz(float tablica[3][3]){
- for(int i = 0; i<3; i++){
- for (int j=0;j<3;j++)
- a[i][j]=tablica[i][j];}}
- macierz(){
- for(int i = 0; i<3; i++){
- for (int j=0;j<3;j++)
- a[i][j]=1;}
- }
- wyswietl();
- };
- int main(int argc, char** argv) {
- /*
- ulamek u1;
- ulamek u2(1,4);
- u1.wyswietl();
- u2.wyswietl();
- */
- float tab[3][3] = {{1,2,3},{3,4,5},{5,6,7}};
- macierz m1(tab);
- macierz m2();
- m2.wyswietl;
- return 0;
- }
- macierz::wyswietl(){
- for(int i = 0; i<3; i++){
- for (int j=0;j<3;j++)
- cout<<a[i][j];
- cout<<endl;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement