Skip to content

Instantly share code, notes, and snippets.

@KhaledElshamy
Created July 11, 2016 21:33
Show Gist options
  • Select an option

  • Save KhaledElshamy/562d2a00fc941cf169d221acdcfb033a to your computer and use it in GitHub Desktop.

Select an option

Save KhaledElshamy/562d2a00fc941cf169d221acdcfb033a to your computer and use it in GitHub Desktop.
URI ONLINE JUDGE 1180
#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