My apologies for not using code blocks. Sometimes I do skip over the rules. I will try to do better. Many thanks to Shabbir for doing what I should have been doing. OK, as per previous posts, the company is supposed to be on character, namely a number.

Dear Virxen,
You have been very helpful. However, alot of the changes you have made, we have not covered yet in class. I am a beginning programmer and I'm not sure how my teacher would react to alot of the terms you have used. The farthest we have gotten is using "if, switch, else if, while, and do while." Is there a simpler way to do this? I do not know what the things listed in the block are (if I do the block right, lol). And yes, average is a variable that I forgot to declare. Thank you for your help.

Lori

Code:
//Code Block
  • Item 1 using namespace std;
  • Item 2 char company1[80];
  • Item 3 else if (cin.fail()){//with this you trap errors related with bad input,string instead of number cerr << "Incorrect data!!!" << endl; cin.clear(); cin.ignore(numeric_limits<int>::max(),'\n'); }
I'm sorry, but I cannot figure out how to block the code.

Last edited by shabbir; 20Mar2010 at 10:01.. Reason: Code blocks