Advertisement
Guest User

funPak

a guest
Mar 31st, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4. double poleProst (double fa, double *fb);
  5. double a,b,p;
  6.  
  7. int main ()
  8. {
  9.     cout<<"podaj a: ";
  10.     cin>>a;
  11.     cout<<"podaj b: ";
  12.     cin>>b;
  13.     p=poleProst(a,&b);
  14.     cout<<"a="<<a<<endl;
  15.     cout<<"b="<<b<<endl;
  16.     cout<<"p="<<p<<endl;    
  17.     system("pause");
  18.     return 0;    
  19. }
  20. double poleProst (double fa, double *fb)
  21. {
  22.     double pole;
  23.     pole = fa * *fb;
  24.     fa=0;
  25.     *fb=0;
  26.     return pole;    
  27. }
  28. //tydzien po swietach poprawa ostatniej kartkowki
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement