HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50943 - Word Game

Section problems

• 50456 - nth Digit of a Number
• 50817 - The Knight Move
• 50463 - Drawing a Triangle
• 50537 - esreveR Triangle
• 50385 - From m to n
• 50966 - TVSH
• 503013 - DNA
• 50970 - Marbles
• 50943 - Word Game
• 50971 - Belote Game
• 50942 - Win or Lose
• 50894 - ASCII Codes
• 50886 - Even or Odd
• 50897 - Prime Number
• 50910 - Flipping Coins
• 50950 - Biggest Number
• 50901 - Sum of Cubes-1

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Word Game

1.       Write a program that plays a word game with the user. The program should ask the user to enter the following:

        His or her name  

        His or her age   

        The name of a city  

        The name of a college   

        Profession  

        Type of animal   

        Pet name  

 

 After the user has entered these items, the program should display the following story, inserting the user’s input into the appropriate locations:

There once was a person named name who lived in city. At the age of age he went to college at college. After graduation he started to work as a profession. Then, he adopted a(n) TypeofAnimal named PetName. They both lived happily ever after!

 

Sample Input1:

Andi

15

Tirana

TOI

Doctor

cat

Kitty

Sample  Output1:

There once was a person named Andi who lived in Tirana. At the age of 15 he went to college at TOI. After graduation he started to work as a doctor. Then, he adopted a(n) cat named kitty. They both lived happily ever after!

 

Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî âûïîëíèòü âõîä.

www.contester.ru