I tried making a program for calculating the difference between two dates on CPP, it does work, but it is not completely accurate.
The program calculates the number of months and multiplies it by 30. The problem here is that all months don't have 30 days. A few has 31 and one has 28/29. My program is below. Can anyone suggest me any changes to get rid of this problem.

Code:
#include<iostream.h>
#include<conio.h>
...