I wrote the following program, but the compiler (I am usingDev-C++) continues to
ID: 3612859 • Letter: I
Question
I wrote the following program, but the compiler (I am usingDev-C++) continues to read line 21. 'Healed' undeclared(first use this function). I am unsure why this error isbeing shown. How do I fix it?// DBZ RPG Healing.cpp
// Calculates HP Healed
#include <iostream>
using namespace std;
int main()
{float HP,Physical,Slept,Rest,Awake,Aid,Days;
cout << "Enter your starting HP: ";
cin >> HP;
cout << "Enter your Physical: ";
cin >> Physical;
cout << "Enter the time slept (hours): ";
cin >> Slept;
cout << "Enter the time rested (hours): ";
cin >> Rest;
cout << "Enter the time awake (hours): ";
cin >> Awake;
cout << "Did you have aid (0 for no, 1 for yes):";
cin >> Aid;
cout << "How long (umber of days): ";
cin >> Days;
Healed =(((Physical*10*((Slept+(Rest/4)/100)))-(Awake/3))*(Aid+1)*Days);
cout << "You recovered " << Healed<< " Health Points. ";
system("pause");
return 0;
}