Horje
c++ program for inflation rate of two numbers Code Example
c++ program for inflation rate of two numbers
#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;

}




Cpp

Related
Fibonacci in c++ Code Example Fibonacci in c++ Code Example
Define and show the implementation of the functions of an arrayList. Code Example Define and show the implementation of the functions of an arrayList. Code Example
how to initialize a vector of pairs in c++ Code Example how to initialize a vector of pairs in c++ Code Example
c++ sigabrt Code Example c++ sigabrt Code Example
convert kelvin to Fahrenheit Code Example convert kelvin to Fahrenheit Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10