Options Analyzer | C++

March 22nd, 2021 12:56:55 PM

					
#include <iostream> #include <cmath> #include <string.h> using namespace std; int main() { string tickerName; int numOfContracts; float currentOptionValue; cout << "Enter a stock ticker: "; getline(cin, tickerName); cout << "Enter the current number of " << tickerName << " contracts you are holding: "; cin >> numOfContracts; cout << "Enter the current price of the option: "; cin >> currentOptionValue; cout << "The value of your " << tickerName << " options are: $" << (currentOptionValue * 100.00) * (numOfContracts); cout << endl; return 0; }

Featured Posts