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
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
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
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
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; //
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; //
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; }
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