Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void numar(int n, int a[], int& k)
- {
- int min=a[0], max=a[0], i;
- for (i=1; i<n; ++i){
- if (a[i]<min) min=a[i];
- if (a[i]>max) max=a[i];
- }
- int copiemin=min, z=1;
- while (copiemin>0) {
- z*=10; copiemin /=10;
- }
- k=max*z+min;
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement