Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. // ConsoleApplication1.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <stdio.h>
  7.  
  8. using namespace std;
  9.  
  10.  
  11.  
  12. int sum(int a[]) {
  13. return a[0] + a[1];
  14. }
  15.  
  16. int sumaab(int a, int b) {
  17. return a + b;
  18. }
  19.  
  20. int main(int argc, int b)
  21. {
  22.  
  23.  
  24. cout << main(2,5) << endl; //Neteisingai
  25. cout << sumaab(3, 5) << endl; //Teisingai
  26.  
  27. //Neteisingai
  28. int a[] = { 1};
  29.  
  30. //Teisingai
  31. //int a[] = { 1 , 2};
  32.  
  33. int suma = sum(a);
  34.  
  35.  
  36. cout << suma;
  37.  
  38. cin >> b;
  39. return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement