Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
69 views1 page

Assignment 10

The document discusses ways to rank n students in a class where there can be ties in marks. It provides examples of ranking 2 students in 3 ways and ranking 3 students in 13 ways by listing all possible rankings and handling cases where students may share the same rank. Students are asked to write a C program called assign10_ followed by their roll number that solves this problem of ranking students for any given n.

Uploaded by

cool_sp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views1 page

Assignment 10

The document discusses ways to rank n students in a class where there can be ties in marks. It provides examples of ranking 2 students in 3 ways and ranking 3 students in 13 ways by listing all possible rankings and handling cases where students may share the same rank. Students are asked to write a C program called assign10_ followed by their roll number that solves this problem of ranking students for any given n.

Uploaded by

cool_sp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment – 10

Consider there are n students in a class. There can be a tie among the marks of the students. In how
many ways these n students can be ranked in an exam. List all the ways.

For example:

2 students {a,b}
Possible ways: 3
(i) Rank-1: a, Rank-2: b
(ii) Rank-1: b, Rank-2: a
(iii) Rank-1: a,b

3 students {a,b,c}
Possible ways: 13
(i) Rank-1: a, Rank-2: b, Rank-3: c
(ii) Rank-1: a, Rank-2: c, Rank-3: b
(iii) Rank-1: b, Rank-2: a, Rank-3: c
(iv) Rank-1: b, Rank-2: c, Rank-3: a
(v) Rank-1: c, Rank-2: a, Rank-3: b
(vi) Rank-1: c, Rank-2: b, Rank-3: a
(vii) Rank-1: a, Rank-2: b,c
(viii) Rank-1: b,c, Rank-2: a
(ix) Rank-1: b, Rank-2: a,c
(x) Rank-1: a,c, Rank-2: b
(xi) Rank-1: c, Rank-2: a,b
(xii) Rank-1: a,b, Rank-2: c
(xiii) Rank-1: a,b,c

The name of the program should be assign10_<ROLL_NO>.c.

You might also like