Created
July 11, 2016 21:33
-
-
Save KhaledElshamy/562d2a00fc941cf169d221acdcfb033a to your computer and use it in GitHub Desktop.
URI ONLINE JUDGE 1180
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| //URI ONLINE JUDGE 1180 | |
| int a, i,b,j,count=0,c=0,d; | |
| scanf("%d", &a); | |
| for (i = 0;i < a;i++) | |
| { | |
| scanf("%d", &b); | |
| if (b < c) | |
| { | |
| c = b; | |
| d = count; | |
| } | |
| count++; | |
| } | |
| printf("Menor valor: %d\nPosicao: %d\n", c, d); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment