Помогите перевести на Си program array18; var A: array[1..10] of integer; i, K: integer; begin for i := 1 to 10 do read(A[i]); for i := 1 to 9 do if A[i] > A[10] then begin K := i; break; end; writeln(A[K]); end.
#include int main() { int A[10]; int K = 0; for (int i = 0; i < 10; i++) scanf("%d", &A[i]); for (int i = 0; i < 9; i++) if (A[i] > A[9]) { K = i; break; } printf("%d", A[K]); }
#include int main(void) { int arr[10], k; for (int i = 0; i < 10; ++i) scanf("%d", &arr[i]); for (int i = 0; i < 9; ++i) if (arr[i] > arr[9]) { k = i; break; } printf("%d", arr[k]); }
выводишь не то