// This program is supposed to figure out how much does a custom banner cost by figuring out the price for each letter and outputting it's total to the screen.
#include <iostream>
#include <string>
using namespace std;
int main()
{
double cost = 3.45, total;
string banner;
cout << "Enter Your Banner Name (Do not use spaces)" << endl;
cout << endl;
getline(cin, banner); //User inputs their custom banner name
cout << endl;
// Outputs how many letters are in the banner
for (int i = 0; i < banner.size(); ++i)
cout << "This sentence has " << i << " letters in it." << endl;
cout << endl;
cout << "How much does each letter Cost? $";
cin >> cost;
cout << endl;
// Calculates the total cost of your made banner
total = cost * (double)banner.size();
cout << "Your total cost is: $ " << total << endl;
cout << endl;
system("PAUSE");
return 0;
}
How do I get rid of the 4018 warning and How can i make the program count how many letters are in the banner and not count spaces as letters too. I appreciate the help guys =). No homo.