#include <stdio.h>#include <conio.h>#define LEN 50int main (void) { int arr[LEN]; int sum,min; int i; sum = 0; do { scanf("%d",&arr[i]); sum += arr[i]; i++; } while (arr[i-1]!=0); putchar ('\n'); i-=2; /*数组下标退回0之前的元素处*/ min = arr[i]; while (i>=0) { if (arr[i]<min) min = arr[i]; i--; } printf ("累加和为:%d\n最小值为:%d\n", sum, min); putchar ('\n'); getch (); return 0;}运行结果