Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. //
  2. //  main.cpp
  3. //  zad_1
  4. //
  5. //  Created by Rafał Hrabia on 19/01/2020.
  6. //  Copyright © 2020 Rafał Hrabia. All rights reserved.
  7. //
  8.  
  9. #include <iostream>
  10.  
  11. using namespace std;
  12.  
  13. int*foo(double *a, double *b) {
  14.     return new int( (*a) * (*b) );
  15. }
  16.  
  17. int main(int argc, const char * argv[]) {
  18.    
  19.     double a = 3.5, b = 1.5;
  20.     cout << *foo(&a, &b) << endl;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement