SHARE
TWEET

Untitled

a guest Feb 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. using namespace std;
  3. int n;
  4. int V[100];
  5.  
  6. int main()
  7. {
  8.  cout<<"n=";cin>>n;
  9.  for(int i=1;i<=n;i=i+1)
  10.  {
  11.      cout<<"V["<<i<<"]=";
  12.      cin>>V[i];
  13.  }
  14.  int cautat;
  15.  int locul;
  16.  cautat=V[1]; locul=1;
  17.  for(int i=2;i<=n;i=i+1)
  18.  {
  19.     if (V[i]<cautat)  {
  20.                                 cautat=V[i];
  21.                                 locul=i;
  22.                             }
  23.  } cout<<" Cel mai mic este "<<cautat<<" prima aparitie este pe loc "<<locul ;
  24. return 0; }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top