0% found this document useful (0 votes)
641 views

CPP 04 PDF

The document describes a program that takes the name of an athlete and the number of medals they won as input. It then prints a message stating that the athlete won that number of medals. An example is given where the input is "Phelps" and "5", and the output is "Phelps won 5 medals".

Uploaded by

bhuvangates
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
641 views

CPP 04 PDF

The document describes a program that takes the name of an athlete and the number of medals they won as input. It then prints a message stating that the athlete won that number of medals. An example is given where the input is "Phelps" and "5", and the output is "Phelps won 5 medals".

Uploaded by

bhuvangates
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Athlete & Medals Count

If the name N of the athlete and the number of medals M won by the athlete in a games tournament
(like Olympics) are passed as the input, the program must print the message as "N won M medals"

Example Input/Output 1:

Input:

Phelps
5

Output:

Phelps won 5 medals

TestCase ID: 4681

Input:

Phelps
5

Expected Output:

Phelps won 5 medals

4 B.BHUVANESWARAN | AP (SG) | CSE | Rajalakshmi Engineering College

You might also like