Hey, i was trying to make a multiplication word problem type thing and when hit debug it always says what my title is. Here's my code.

#include <iostream>
void main();
{
	// Declare Variables!!!
	char name[15];
	short quantity;
	float amount;
	float totalSale;

	cout << "Enter Customer's Name: ";
	cin.getline(name,15);
	cout << "Enter the cost: ";
	cin >> amount;
	cout << "Enter the quantity: ";
	cin >> quantity;

	totalSale = amount * (float)quantity;

	cout << "The Total is: " << totalSale << endl;
}

If you could help, that would be awesome, seeya

Whenever i do that though, i get nine errors that say
error C2065: 'cout' : undeclared identifier
error C2065: 'cin' : undeclared identifier

and things like that, what shall i do?

There are several ways to fix it.

#include <iostream>
using namespace std;

or

#include <iostream>
using std::cout;
using std::cin;

or

std::cout << "Enter Customer's Name: ";
std::cin.getline(name,15);
This question has already been answered. Start a new discussion instead.