Manikyr 9 Newbie Poster

I need help with my visual basic assignment!
The program has to include an array with at least two strings.
In the layout there should be one label which explains what the user has to do, for example "Write two strings" (or x strings) and one label that shows the latest inputed string.
There should also exist a textbox which the user use for inputs of strings.
One button to add the strings in the array.
There have to be one meny with the selctions "Show" (that shows the last string from the array and displays it in one label) and "Exit" (to shut down program).

I have read my book correctly, but I doesnt seem the get it anyway!
Can some one explain to me step by step what to do, because I dont know where to start! Everything is up-side-down for the moment!

Please, help me!

Kind regards!

Manikyr 9 Newbie Poster

Thank you for your help! Your tips improved my knowledge extremly!
People have been so rude to me before you helped me!

Manikyr 9 Newbie Poster

How do I write to be able to write in swedish with å ä ö?
I imported "iodos.h"
and added dos_console(); to main, but it doesnt respond!

Manikyr 9 Newbie Poster

I had issues with CMD before, so I guess I have the same problem now!
Do you have any suggestions how I can comment the text?
What is important and what's not?
I think the program should start over after you are finished, but my doesnt.
I looks like this: "Home team won over guest team with 2-3Press key to continue"
and when you press a key the program shuts down!

My next assignment is to let an user to write in ordinary text or morse code, and the user can choose if he/she wants to translate it!
Example:
Welcome!
1. Translate from morse
2. Translate to morse

Do you have any tips for me?
Should I use case, switch and so on...

Manikyr 9 Newbie Poster

When home team is 7 and guest team is 3 the CMD shuts down!
Thats my new problem!

= )

Manikyr 9 Newbie Poster

Thank you for taking your time!
I tried to run it again, but it still doesnt show the right output!

Manikyr 9 Newbie Poster

This is the final code, and it doesn't work when I run it, the answers are wrong i CMD!

#include <iostream>
#include <string>


 using namespace std;
  int main(void)
 {

	 string home, guest; 
                 int hnr, bnr;

	 cout << "Title" << endl;
	 cout << "----------------" << endl;

	 cout << "Name on home team: "; cin >> home;
	 cout << "How many goals for " << home << ":";              cin>>hnr;
	 cout << endl;
    
	 cout << "Name of guest team: "; cin >> guest;
	 cout << "How many goals for " << guest << ":"; cin >>     bnr;
	 cout <<endl;
   


	 if (hnr > bnr)
	 {
		  if (hnr > 3 && bnr < 3)
			 cout << "Home team crushed guest  team";
		  else
				cout << home << " won home against " 
				<< guest << ". Final result " 
				 << hnr << "-" << bnr;
		
	 }
	 else if (bnr < hnr)
	 {	
		  if (bnr > 3 && hnr < 3)
			  cout << "Guest team crushed home team";
		  else
       		  cout << guest << " guest won against " 
			 << home << ". Final result " 
			 << hnr << "-" << bnr;
	 }
	 else (bnr == hnr);
		 cout << "Tie between " 
			  << home << " and " 
			  << guest << ". Final result " 
              << hnr << "-" << bnr; 
  }#include <iostream>
#include <string>


 using namespace std;
  int main(void)
 {

	 string home, guest; 
                 int hnr, bnr;

	 cout << "Title" << endl;
	 cout << "----------------" << endl;

	 cout << "Name on home team: "; cin >> home; …
Manikyr 9 Newbie Poster

Excuse me.. I don't understand!
It's the first week for me!
I feel ridiculously stupid! ; )

Manikyr 9 Newbie Poster

I think my teacher means that ridicolously big is 1-5, 3-7 and so on, instead of 1-2 or 2-3!

Manikyr 9 Newbie Poster

Your assignment is to make a program which automatice the output of an sportstitel!
The user inputs the team name and score of the home and guest team. After the program will automaticly write a fitting sentence for the situation.

Manikyr 9 Newbie Poster

This it the following if-situations I need:

If home team won over guest team
If home team won ridiculously big over guest team
If guest team won over home team
If guest team won ridiculously big over home tam
If they got the same score

Manikyr 9 Newbie Poster

No, I need to add more if-situations!
Do you understand what I mean? My english isn't the best!

Manikyr 9 Newbie Poster

Yes, from the beginning, but my teacher wanted me to add more situations!

For example:
"Home team crusched guest with 5-1!"
Vice versa!

Manikyr 9 Newbie Poster

It doesnt work anyway!
I don't understand!
Can someone try to debug it?

Manikyr 9 Newbie Poster

I think I need more help!

My teacher wanted me to have more output situations.
Now my code look like this and again I don't get any errors, but the output is wrong!

#include <iostream>
#include <string>


 using namespace std;
  int main(void)
 {

	 string home, guest; 
                 int hnr, bnr;

	 cout << "Title" << endl;
	 cout << "----------------" << endl;

	 cout << "Name on home team: "; cin >> home;
	 cout << "How many goals for " << home << ":";              cin>>hnr;
	 cout << endl;
    
	 cout << "Name of guest team: "; cin >> guest;
	 cout << "How many goals for " << guest << ":"; cin >>     bnr;
	 cout <<endl;
   


	 if (hnr > bnr)
	 {
		  if (hnr > 3 && bnr < 3)
			 cout << "Home team crushed guest  team";
		  else
				cout << home << " won home against " 
				<< guest << ". Final result " 
				 << hnr << "-" << bnr;
		
	 }
	 else if (bnr < hnr)
	 {	
		  if (bnr > 3 && hnr < 3)
			  cout << "Guest team crushed home team";
		  else
       		  cout << guest << " guest won against " 
			 << home << ". Final result " 
			 << hnr << "-" << bnr;
	 }
	 else (bnr == hnr);
		 cout << "Tie between " 
			  << home << " and " 
			  << guest << ". Final result " 
              << hnr << "-" << bnr; 
  }
Manikyr 9 Newbie Poster

Thank you for all help!

Manikyr 9 Newbie Poster

Hi!
My assignment is to write a program where you write in two sport teams, home teams and guest team and their reults. After the program will output information who won and if there were a tie. I tried to translate okay from Swedish!
The program isn't working and there are no error message.
Can someone help me!
CMD displays the first output, but after that the program shuts down with an error message.

#include <iostream>
#include <string>

 using namespace std;
  int main(void)
 {

	 string home, guest, hnr, bnr;

	 cout << "Title" << endl;
	 cout << "----------------" << endl;

	 cout << "Write name of home team: "; cin >> home;
	 cout << "How many goals did" + home; cin >> hnr;

	 cout << "Write name of guest team: "; cin >> guest;
	 cout << "How many goals did " + guest; cin >> bnr;

	 if (hnr > bnr)
	 {
		 cout << home << " won against " 
			  << guest << "The resultat were " 
			  << hnr << "-" << bnr;
	 }
	 else if (hnr < bnr)
	 {	
		cout << guest << " guest won over " 
			 << home << ". Final result " 
			 << hnr << "-" << bnr;
	 }
	 else (hnr && bnr);
	 {	
		 cout << Tie between " 
			  << home << " and " 
			  << guest << ". The match ended    with " 
			  << hnr << "-" << bnr;
	 }
  }
tux4life commented: if(post == 1 && used_code_tags) rep += 9; :P +9