Thread: Need help

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    25

    Need help

    How can i write kode in c++ to get this result:

    Write your home team: Arsenal
    How many goals make Arsenal: 5

    Write your away team: Liverbol
    How many goals make Liverbol: 1

  2. #2
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    I'm am posting this because it appears that you are posting a homework assignment or other project and you are asking for someone else to do all of the work.

    Please don't ask people to do all your work for you, See the announcement on Homework at the top of the forum to see what is acceptable or PM me.

    Basically people are happy to help, but they're not going to do it all for you.

    Show us what you've got. Show your code (using code tags), or where you're confused, and I'm sure someone will be happy to help. If it's something that you absolutely don't understand how it works, like you have no clue how qsort works, then ask a general question about the function and I'm sure someone will explain it. Though they may not give you all of the code for it, but someone will explain the concept. Also, don't forget the site's tutorials. They will lay out many concepts for you.

    On obivous homework questions especially, I also like to remind people of the board's tenth guildeline, while this board is very helpful to people, make sure you have your instructor's permission before seeking help on assignments. While people on these boards are more than happy to help, we discourage people from asking for help on graded work without the instructor's permission, and we claim no repsonsibilty for any cheating or honor violations.

    Feel free to PM me with any questions.

    Good Luck,

    Kermi3
    Lead Moderator
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  3. #3
    Registered User
    Join Date
    Sep 2005
    Posts
    25
    Hi
    Thanks , You are not right in you explaining because what i wrote is not a home work but because iam a new in c++ programing and iam studing a lone so i need a help to understand things from other experter. so iam sending the kod you ask for.
    Regards
    Peter

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    25
    int main () //
    {

    int tal1; //
    int tal2
    cout << "\nWrite your home team : "; //
    cin >> tal1;
    cout << "\nHow many goals make Arsenal : ";
    cin >> tal1;
    cout << "\nWrite your away team : "; //
    cin >> tal2;
    cout << "\nHow many goals make Arsenal : ";
    cin >> tal2;

    return 0; //

  5. #5
    Registered User
    Join Date
    Sep 2005
    Posts
    25
    int main () //
    {

    int tal1; //
    int tal2
    cout << "\nWrite your home team : "; //
    cin >> tal1;
    cout << "\nHow many goals make Arsenal : ";
    cin >> tal1;
    cout << "\nWrite your away team : "; //
    cin >> tal2;
    cout << "\nHow many goals make Liverbol : ";
    cin >> tal2;

    return 0; //

  6. #6
    ---
    Join Date
    May 2004
    Posts
    1,379
    Code:
    #include <iostream>
    
    int main(void){
      std::string name;
      int score;
      
      std::cout << "Write your home team: ";
      std::cin >> name;
      
      std::cout << "How many goals did " << name << " make? ";
      std::cin >> score;
      
      std::cout << name << " made " << score << " goals." << std::endl;
      
      std::cin.ignore();
      std::cin.get();
      return 0;
    }

  7. #7
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    I appologize for believing this homework.

    However, it would still greatly behoove you to read the forum guidelines, and the information on code tags. Before further posting. I also recommend the site's tutorials.

    k3
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

Popular pages Recent additions subscribe to a feed