I have this assignment for my C++ class. It asks to use a static variable. I don't have the book with me so I can not look up what that is. Can someone explain what the problem wants me to do as well as an explanation (Or link me to) an explanation of a static variable?
Thank you!
int pb(){
staticdouble unit = 2;
}
int main(){
double x,y;
do {
cout << "Enter a size and price" <<endl;
cin>>x,y;
if ( x/y < pb() ) {
cout<< x/y <<endl;
}
} while (x != 0 || y !=0);
return 0;
}