i wanna know how to set an certain number with commas, for instance
if i had this
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int numItems;
double total;
const double costOfItems = 1050;
cout << "enter number of items ";
cin >> numItems;
total = costOfItems * numItems;
cout << total;
}
how would i set 4200 output as 4,200