Untitled

public
yousefkarem91 Sep 18, 2024 Never 45
Clone
C++ paste1.cpp 14 lines (14 loc) | 235 Bytes
1
#include <iostream>
2
using namespace std;
3
int main()
4
{
5
int n, p, q, f=0;
6
cin >> n;
7
for (int i = 1; i <= n; i++) {
8
cin >> p >> q;
9
if (q - p >=2) {
10
f++;
11
}
12
}
13
cout << f;
14
}