/* Minimum value of Array */
#include<stdio.h> int main() { int arr[10],i,min=0; printf("Please enter 10 values:\n"); for(i=0;i<10;i++) scanf("%d",&arr[i]); min=arr[0]; for(i=1;i<10;i++) { if(min>arr[i]) min=arr[i]; } printf("Minimum value of Array: %d",min); return 0; }
No comments:
Post a Comment