Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(void)
- {
- int b,count=1;
- int max=0,min=9999;
- int no[10];
- FILE *read;
- read=fopen("input.txt","r");
- while((fscanf(read,"%d",&b))!=EOF)
- {
- no[count]=b;
- if(b>max)
- max=b;
- if(b<min)
- min=b;
- count++;
- }
- int i;
- for(i=1;i<count;i++)
- {
- printf("%d\n",no[i]);
- }
- printf("min=%d /n max=%d",min,max);
- fclose(read);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement