Run Code
|
Code Wall
|
Users
|
Misc
|
Feedback
|
About
|
Login
|
Theme
|
Privacy
Max
//gcc 5.4.0 #include <stdio.h> int maxarray(int array[], int size) { int i; int max; for(i=0; i==(size-1) ;i++) { if ((array&(1<<(i+1)))>(array&(1<<i))) { max = (array&(1<<(i+1))); } else { max = (array&(1<<i)); } } return max; } int main(void) { int Array[5]; int Size = 5; int MaxNum; sprintf(Array, "12345"); MaxNum = maxarray(Array, Size); printf("The maximun elemrnt is %d\n", MaxNum); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
swipe the numbers in cyclic way
C_141106_Factorial
Data Types
PRACTICE 1
3850
hello 5
Project 5 v.05
A_141211_mayor
Project v0.07
Avance de guia 4- Pregunta 1
Please log in to post a comment.