SHARE
TWEET

Untitled

a guest Dec 6th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n, nr=0, i, x;
  8.     ifstream f("numere.in");
  9.     f>>n>>x;
  10.     i=n;
  11.     do
  12.     {
  13.         while(x<i)
  14.         {
  15.             nr++;
  16.             i--;
  17.         }
  18.         f>>x;
  19.     }
  20.     while(i>0 && f>>x);
  21.     cout<<nr;
  22. }
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