Advertisement
VXP

Untitled

VXP
Oct 6th, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int _tmain(int argc, _TCHAR* argv[])
  5. {
  6.     setlocale(0, ".1251");
  7.     int a[11], i, min;
  8.     for( i = 0; i < 11; i++ ) cin >> a[i];
  9.     min = a[0];
  10.     for( i = 0; i < 11; i++ )
  11.     {
  12.         if( a[i] < min )
  13.             min = a[i];
  14.     }
  15.     for( i = 0; i < 11; i++ )
  16.         if( a[i] < 0 )
  17.             a[i] = min;
  18.     system("PAUSE");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement