diff options
author | Siddhu8990 | 2017-07-04 20:20:46 +0530 |
---|---|---|
committer | Siddhu8990 | 2017-07-04 20:20:46 +0530 |
commit | e9de337a34e123749927039f7011fb30fc96f7c9 (patch) | |
tree | 4056424cb082605c759d213cff058c2491b6d43d /2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c | |
parent | 9981dc71e9478fee921175d300d69fd5ba655dc5 (diff) | |
parent | e7a1a9bd776aa3ebdd13aea4d4ef838e65acb34c (diff) | |
download | Scilab2C-e9de337a34e123749927039f7011fb30fc96f7c9.tar.gz Scilab2C-e9de337a34e123749927039f7011fb30fc96f7c9.tar.bz2 Scilab2C-e9de337a34e123749927039f7011fb30fc96f7c9.zip |
Removed wiringPi.h include bug, added amell, bug removed for dct and idct
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c')
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c index 3d586232..121d26ae 100644 --- a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c +++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c @@ -31,7 +31,8 @@ uint8 u8gcdua(uint8* in,int size) int x=*in; int y=*(in+1); int max=(x>y)?x:y; - for(int i=max;i>=1;i--) + int i; + for(i=max;i>=1;i--) { if(x%i==0 && y%i==0) { @@ -39,12 +40,13 @@ uint8 u8gcdua(uint8* in,int size) break; } } - for(int j=2;j<size;j++) + int j; + for(j=2;j<size;j++) { x=temp; y=*(in+j); max=(x>y)?x:y; - for(int i=max;i>=1;i--) + for(i=max;i>=1;i--) { if(x%i==0 && y%i==0) { |