Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- main() {
- int pole[] = {1, 5, 9, 7, 8, 6, 3, 4, -1, 5, 8, -10, -5, -58, 52, 69, 58, 70, 100, 5, 23, 45, 85};
- int i;
- int cis = 0;
- int index;
- for (i = 0; i < sizeof(pole) / sizeof(int); i++) {
- if (pole[i] > cis) {
- cis = pole[i];
- index = i;
- }
- }
- printf("Nejvetsi cislo je: %d s indexem: %d\n", cis, index);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement