Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- int n, nr=0, i, x;
- ifstream f("numere.in");
- f>>n>>x;
- i=n;
- do
- {
- while(x<i)
- {
- nr++;
- i--;
- }
- f>>x;
- }
- while(i>0 && f>>x);
- cout<<nr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement