SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int Nrcif(int n)
  6. {
  7.     int nr = 0;
  8.     while(n)
  9.     {
  10.         nr++;
  11.         n/=10;
  12.     }
  13.     return nr;
  14. }
  15.  
  16. void afismat(int a[100][100],int &n)
  17. {
  18.     for(int i=1; i<=n; i++)
  19.     {
  20.         for(int j=1; j<=n; j++)
  21.             cout<<a[i][j]<<" ";
  22.         cout<<'\n';
  23.     }
  24.  
  25. }
  26. int main()
  27. {
  28.     int a[100][100]= {},n,i,j,nr = 1,mini;
  29.     cin >> n;
  30.  
  31.     for(i=1; i<=n; i++)
  32.         for(j=1; j<=n; j++) cin >> a[i][j];
  33.  
  34.     for(i=1; i<=n; i++)
  35.     {
  36.         mini = a[1][j];
  37.         for(j=2; j <= n; j++)
  38.         {
  39.             if(a[i][j]<mini) mini = a[i][j];
  40.         }
  41.         cout << mini << " ";
  42.     }
  43.     return 0;
  44. }
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