Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x=100;
- cout<<"numarul de numere introduse=";cin>>x;
- int minnum=999999,k;
- for(int i=0;i<x;i++)
- {
- int currnum;
- cin>>currnum;
- if(minnum>currnum)
- {
- minnum=currnum;
- k=i;
- }
- }
- cout<<"poz:"<<k+1<<":"<<minnum<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement