Easy Solution

```cpp []
class Solution {
public:
    int countPairs(vector<int>& nums, int target) {
        int i,j,n=nums.size(),ct=0;
        for(i=0;i<n-1;++i){
            for(j=i+1;j<n;++j)
                 {
                     if(nums[i]+nums[j]<target)
                         ++ct;
                 }
        }
        return ct;
    }
};
```
['C++']