Advertisement
Guest User

Salutareeee

a guest
Feb 17th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int x=100;
  8. cout<<"numarul de numere introduse=";cin>>x;
  9. int minnum=999999,k;
  10. for(int i=0;i<x;i++)
  11. {
  12.     int currnum;
  13.     cin>>currnum;
  14.     if(minnum>currnum)
  15.     {
  16.         minnum=currnum;
  17.         k=i;
  18.  
  19.      }
  20.  
  21. }
  22. cout<<"poz:"<<k+1<<":"<<minnum<<endl;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement