Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Maximum
//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[(i+1)])>(array[i])) { max = (array[i+1]); } else if ((array[(i+1)])<=(array[i])) { max = (array[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.
DUE TUESDAY
linear hybrid cellular automaton utilizing rules 90 and 150 with period of (2^64)-1 for generating high quality random bits is reversible
Tree
FileCat
22nd HW Switchv1.0
My C Code
llist.h
Project 4 v0.1
Find a Node Sibling Test
CheckProcessorEndianness
stackse - search stackoverflow differently
Please log in to post a comment.