6

Chess, Carrom and Scrabble Players (Id-1145)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018]

Program ID- 1145

Each student in a class of ‘n’ plays at least one indoor game chess, carrom and scrabble. Given three list of names of students who play chess, scrabble and carrom, develop an algorithm and write a C++ code to find the students who can
(i) Play chess and carrom
(ii) Chess, carrom but not scrabble
Understand the template code and implement the member functions of the class
Input Format
Number of students who play chess
Name of student1 who plays chess
Name of student2 who plays chess

Name of student-n who plays scrabble

Number of students who play scrabble
Name of student1 who plays scrabble
Name of student2 who plays scrabble

Name of student-n who plays scrabble
Number of students who play carrom
Name of student1 who plays carrom
Name of student2 who plays carrom

Name of student-n who plays carrom
Output Format
Name of students who play chess and carrom. order the names as given in the chess input list . separate names by a comma Name of students who play chess and carrom but not scrabble. Order the names as given in the chess input list. separate names by a comma
Boundary Conditions
Number of students in class will not be more than 30
Length of name of students in class will not be more than 20
Assume that none of the set will become empty

Code

Please Comment Working if the code worked to you

If you have other working codes please comment the codes enclosing with <pre> and </pre> 🙂

Example: <pre> Your Code </pre>

C++ Code 

Follow for important news/announcements in VIT
The Above Codes are for reference only. It doesn't mean everyone to directly copy/paste those codes.

 

Click Here to Leave a Comment Below 6 comments
shubham - March 27, 2018

not working

Reply
qwerdsaq - March 27, 2018

not working

Reply
tej - March 27, 2018

lot of errors,please fix and update

Reply
Spiderman - March 27, 2018

Change numE to num_Of_Else. It works.

Reply
xxx - March 27, 2018

not working

Reply
neil - August 21, 2020

Reply

Leave a Reply:

This site uses cookies and by using the site you are consenting to this.