I had to make a program that calculates how much you gain or loose in a stock markect. I have everything worked out excpet how to use char. I've looked it up but i don't understand anything. Can you help explain it to me?
// Project 6.4. Calculates how much money you have gained, or lost, with a stock.
#include <iostream>
using namespace std;
float StockName, NumOfStocks, OpenValue, CloseValue, Total;
int main ()
{
cout << "Please enter the name of the stock. \n" ;
cin >> StockName;
cout << "How many stocks do you own? \n" ;
cin >> NumOfStocks;
cout << "Please enter its opening value. \n" ;
cin >> OpenValue;
cout << "Please enter its closing value. \n" ;
cin >> CloseValue;
Total = (CloseValue - OpenValue) * NumOfStocks ;
if (Total > 0)
cout << "You have gained $" <<Total<< ".\n" ;
else (Total < 0) ;
cout << "You have lost $" <<Total<< ".\n" ;
return 0;
}