Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #define ARRAYSIZE 10000
- unsigned long long update(unsigned long long*,unsigned long long*,int);
- int main(int argc, char const *argv[])
- {
- unsigned long long myArray1[ARRAYSIZE];
- unsigned long long myArray2[ARRAYSIZE];
- // Init vetor
- for (int i = 0; i < ARRAYSIZE; ++i)
- {
- myArray1[i]=i;
- myArray2[i]=i;
- }
- printf("%llu\n",update(myArray1,myArray2,ARRAYSIZE));
- system("pause");
- return 0;
- }
- unsigned long long update(unsigned long long a[],unsigned long long b[], int n)
- {
- unsigned long long sum = 0;
- for (int i = 0; i < n; ++i)
- {
- sum+=a[i]*b[i];
- }
- return sum;
- }#include <stdio.h>
- #include <stdlib.h>
- #define ARRAYSIZE 10000
- unsigned long long update(unsigned long long*,unsigned long long*,int);
- int main(int argc, char const *argv[])
- {
- unsigned long long myArray1[ARRAYSIZE];
- unsigned long long myArray2[ARRAYSIZE];
- // Init vetor
- for (int i = 0; i < ARRAYSIZE; ++i)
- {
- myArray1[i]=i;
- myArray2[i]=i;
- }
- printf("%llu\n",update(myArray1,myArray2,ARRAYSIZE));
- system("pause");
- return 0;
- }
- unsigned long long update(unsigned long long a[],unsigned long long b[], int n)
- {
- unsigned long long sum = 0;
- for (int i = 0; i < n; ++i)
- {
- sum+=a[i]*b[i];
- }
- return sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment