dar290199
// Си #include <iostream>#include <stdio.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(void) { const int N = 20; int a[N]; int i, x, min; for(i = 0; i < N; i++) scanf("%d", &a[i]); min = 1000; for(i = 0; i < N; i++) { if ((a[i]%2 != 0) && (a[i]%5 == 0) && (a[i] < min)) x = min = a[i]; } printf("%d", x); return 0;}
Answers & Comments
#include <iostream>#include <stdio.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(void) { const int N = 20; int a[N]; int i, x, min; for(i = 0; i < N; i++) scanf("%d", &a[i]); min = 1000; for(i = 0; i < N; i++) { if ((a[i]%2 != 0) && (a[i]%5 == 0) && (a[i] < min)) x = min = a[i]; } printf("%d", x); return 0;}