#include <iostream>
using namespace std;
double InflationRate(float x, float z);
int main()
{
float x, z;
cout << "Enter the old indicies:";
cin >> x;
cout << "Enter the new indicies:";
cin>> z;
double Rate = InflationRate(x, z);
cout << "Inflation rate is: " << Rate << endl;
return 0;
}
double InflationRate (float x, float z)
{
if(x<0||z<0||x==0)
return 0;
return (z - x) / x * 100;
}