I would say your doing everything right, your just not printing tdp, which I'd 
think would be the main calculation.

Thanks,
Tyler Littlefield
Web: tysdomain.com
email: ty...@tysdomain.com
My programs don't have bugs, they're called randomly added features.

  ----- Original Message ----- 
  From: joborry_25 
  To: c-prog@yahoogroups.com 
  Sent: Sunday, May 17, 2009 4:45 PM
  Subject: [c-prog] help with a program





  //Torrestest1.cpp
  //the club

  #include <iostream>
  #include <string>

  I am a current student at Keiser , I am trying to run this program put the 
calculation is not doing what it is suppose to do. Is there anybody who knows 
where and what i did wrong. It will really help. 
  Thank you in advance for your help.

  using std::cout;
  using std::cin;
  using std::endl;
  using std::string;

  int main ()

  {

  //Declaring Variable
  string Name1 = "";
  string Name2 = "";
  int DrinkP = 0;
  int FoodP = 0;
  int TDp = 0;

  //Enter input Items
  cout << "What type of Drinks are you intrested in... ";
  getline(cin, Name1);
  cout << "Enter Price... ";
  cin >> DrinkP;

  cout << " Please Enter the Name of the Food... ";
  getline(cin, Name2);
  cout << "Please Enter Price ... ";
  cin >> FoodP;

  //Calculation
  TDp = DrinkP + FoodP;


  //Display output
  cout << "The Cost For Food is:: " << FoodP << endl;
  cout << "The Cost For Drink is:: " << DrinkP << endl;

  return 0;
  }



  

[Non-text portions of this message have been removed]

Reply via email to