0% found this document useful (0 votes)
114 views13 pages

Maths Assignment: Amrita Vishwa Vidyapeedam

The document is a math assignment submitted by Gautam G T. It contains two questions asking to print all possible license plate and auditorium chair labeling patterns using English letters and positive integers in C language. For both questions, programs are provided that use nested for loops to print all combinations of letters and integers up to the given limits, and count the total number of patterns. The outputs show all 234 possible license plate patterns for the first question and all 1,326 possible chair labeling patterns for the second question.

Uploaded by

AJ Ajay
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)
114 views13 pages

Maths Assignment: Amrita Vishwa Vidyapeedam

The document is a math assignment submitted by Gautam G T. It contains two questions asking to print all possible license plate and auditorium chair labeling patterns using English letters and positive integers in C language. For both questions, programs are provided that use nested for loops to print all combinations of letters and integers up to the given limits, and count the total number of patterns. The outputs show all 234 possible license plate patterns for the first question and all 1,326 possible chair labeling patterns for the second question.

Uploaded by

AJ Ajay
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/ 13

MATHS ASSIGNMENT

AMRITA VISHWA VIDYAPEEDAM

BY

GAUTAM G T

MY.SC.U3BCA21036

BCA C SECTION
Qn 1: A licence plate contains 1 alphabet followed by 1 digit which is
not a zero. Print all the possible patterns and number of patterns in C
Language.

Program:

#include<stdio.h>

int main()

char alpha[27]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};

int i,j,count=0;

for(i=0;i<26;i++)

for(j=1;j<10;j++)

printf("%c%d\n",alpha[i],j);

count=count+1;

printf("Number of patterns = %d",count);

return 0;

Output:

A1 B1 C1 D1 E1

A2 B2 C2 D2 E2

A3 B3 C3 D3 E3

A4 B4 C4 D4 E4

A5 B5 C5 D5 E5

A6 B6 C6 D6 E6

A7 B7 C7 D7 E7

A8 B8 C8 D8 E8

A9 B9 C9 D9 E9
F1 I5 L9 P4 S8

F2 I6 M1 P5 S9

F3 I7 M2 P6 T1

F4 I8 M3 P7 T2

F5 I9 M4 P8 T3

F6 J1 M5 P9 T4

F7 J2 M6 Q1 T5

F8 J3 M7 Q2 T6

F9 J4 M8 Q3 T7

G1 J5 M9 Q4 T8

G2 J6 N1 Q5 T9

G3 J7 N2 Q6 U1

G4 J8 N3 Q7 U2

G5 J9 N4 Q8 U3

G6 K1 N5 Q9 U4

G7 K2 N6 R1 U5

G8 K3 N7 R2 U6

G9 K4 N8 R3 U7

H1 K5 N9 R4 U8

H2 K6 O1 R5 U9

H3 K7 O2 R6 V1

H4 K8 O3 R7 V2

H5 K9 O4 R8 V3

H6 L1 O5 R9 V4

H7 L2 O6 S1 V5

H8 L3 O7 S2 V6

H9 L4 O8 S3 V7

I1 L5 O9 S4 V8

I2 L6 P1 S5 V9

I3 L7 P2 S6 W1

I4 L8 P3 S7 W2
W3 X1 X8 Y6 Z4

W4 X2 X9 Y7 Z5

W5 X3 Y1 Y8 Z6

W6 X4 Y2 Y9 Z7

W7 X5 Y3 Z1 Z8

W8 X6 Y4 Z2 Z9

W9 X7 Y5 Z3

Number of patterns = 234

Qn 2: The chairs of an auditorium are to be labelled with English letter


followed positive integer not exceeding 51. Print all the possible
patterns and number of patterns in C Language.

Program:

#include<stdio.h>

int main()

char alpha[27]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};

int i,j,count=0;

for(i=0;i<26;i++)

for(j=1;j<52;j++)

printf("%c%d\n",alpha[i],j);

count=count+1;

printf("Number of patterns = %d",count);

return 0;

}
Output:

A1 A30 B8 B38 C16

A2 A31 B9 B39 C17

A3 A32 B10 B40 C18

A4 A33 B11 B41 C19

A5 A34 B12 B42 C20

A6 A35 B13 B43 C21

A7 A36 B14 B44 C22

A8 A37 B15 B45 C23

A9 A38 B16 B46 C24

A10 A39 B17 B47 C25

A11 A40 B18 B48 C26

A12 A41 B19 B49 C27

A13 A42 B20 B50 C28

A14 A43 B21 B51 C29

A15 A44 B22 C1 C30

A16 A45 B23 C2 C31

A17 A46 B24 C3 C32

A18 A47 B25B26 C4 C33

A19 A48 B27 C5 C34

A20 A49 B28 C6 C35

A21 A50 B29 C7 C36

A22 A51 B30 C8 C37

A23 B1 B31 C9 C38

A24 B2 B32 C10 C39

A25 B3 B33 C11 C40

A26 B4 B34 C12 C41

A27 B5 B35 C13 C42

A28 B6 B36 C14 C43

A29 B7 B37 C15 C44


C45 D25 E5 E36 F16

C46 D26 E6 E37 F17

C47 D27 E7 E38 F18

C48 D28 E8 E39 F19

C49 D29 E9 E40 F20

C50 D30 E10 E41 F21

C51 D31 E11 E42 F22

D1 D32 E12 E43 F23

D2 D33 E13 E44 F24

D3 D34 E14 E45 F25

D4 D35 E15 E46 F26

D5 D36 E16 E47 F27

D6 D37 E17 E48 F28

D7 D38 E18 E49 F29

D8 D39 E19 E50 F30

D9 D40 E20 E51 F31

D10 D41 E21 F1 F32

D11 D42 E22 F2 F33

D12 D43 E23 F3 F34

D13 D44 E24 F4 F35

D14 D45 E25 F5 F36

D15 D46 E26 F6 F37

D16 D47 E27 F7 F38

D17 D48 E28 F8 F39

D18 D49 E29 F9 F40

D19 D50 E30 F10 F41

D20 D51 E31 F11 F42

D21 E1 E32 F12 F43

D22 E2 E33 F13 F44

D23 E3 E34 F14 F45

D24 E4 E35 F15 F46


F47 G27 H7 H38 I18

F48 G28 H8 H39 I19

F49 G29 H9 H40 I20

F50 G30 H10 H41 I21

F51 G31 H11 H42 I22

G1 G32 H12 H43 I23

G2 G33 H13 H44 I24

G3 G34 H14 H45 I25

G4 G35 H15 H46 I26

G5 G36 H16 H47 I27

G6 G37 H17 H48 I28

G7 G38 H18 H49 I29

G8 G39 H19 H50 I30

G9 G40 H20 H51 I31

G10 G41 H21 I1 I32

G11 G42 H22 I2 I33

G12 G43 H23 I3 I34

G13 G44 H24 I4 I35

G14 G45 H25 I5 I36

G15 G46 H26 I6 I37

G16 G47 H27 I7 I38

G17 G48 H28 I8 I39

G18 G49 H29 I9 I40

G19 G50 H30 I10 I41

G20 G51 H31 I11 I42

G21 H1 H32 I12 I43

G22 H2 H33 I13 I44

G23 H3 H34 I14 I45

G24 H4 H35 I15 I46

G25 H5 H36 I16 I47

G26 H6 H37 I17 I48


I49 J29 K9 K40 L20

I50 J30 K10 K41 L21

I51 J31 K11 K42 L22

J1 J32 K12 K43 L23

J2 J33 K13 K44 L24

J3 J34 K14 K45 L25

J4 J35 K15 K46 L26

J5 J36 K16 K47 L27

J6 J37 K17 K48 L28

J7 J38 K18 K49 L29

J8 J39 K19 K50 L30

J9 J40 K20 K51 L31

J10 J41 K21 L1 L32

J11 J42 K22 L2 L33

J12 J43 K23 L3 L34

J13 J44 K24 L4 L35

J14 J45 K25 L5 L36

J15 J46 K26 L6 L37

J16 J47 K27 L7 L38

J17 J48 K28 L8 L39

J18 J49 K29 L9 L40

J19 J50 K30 L10 L41

J20 J51 K31 L11 L42

J21 K1 K32 L12 L43

J22 K2 K33 L13 L44

J23 K3 K34 L14 L45

J24 K4 K35 L15 L46

J25 K5 K36 L16 L47

J26 K6 K37 L17 L48

J27 K7 K38 L18 L49

J28 K8 K39 L19 L50


L51 M31 N11 N42 O22

M1 M32 N12 N43 O23

M2 M33 N13 N44 O24

M3 M34 N14 N45 O25

M4 M35 N15 N46 O26

M5 M36 N16 N47 O27

M6 M37 N17 N48 O28

M7 M38 N18 N49 O29

M8 M39 N19 N50 O30

M9 M40 N20 N51 O31

M10 M41 N21 O1 O32

M11 M42 N22 O2 O33

M12 M43 N23 O3 O34

M13 M44 N24 O4 O35

M14 M45 N25 O5 O36

M15 M46 N26 O6 O37

M16 M47 N27 O7 O38

M17 M48 N28 O8 O39

M18 M49 N29 O9 O40

M19 M50 N30 O10 O41

M20 M51 N31 O11 O42

M21 N1 N32 O12 O43

M22 N2 N33 O13 O44

M23 N3 N34 O14 O45

M24 N4 N35 O15 O46

M25 N5 N36 O16 O47

M26 N6 N37 O17 O48

M27 N7 N38 O18 O49

M28 N8 N39 O19 O50

M29 N9 N40 O20 O51

M30 N10 N41 O21 P1


P2 P33 Q13 Q44 R24

P3 P34 Q14 Q45 R25

P4 P35 Q15 Q46 R26

P5 P36 Q16 Q47 R27

P6 P37 Q17 Q48 R28

P7 P38 Q18 Q49 R29

P8 P39 Q19 Q50 R30

P9 P40 Q20 Q51 R31

P10 P41 Q21 R1 R32

P11 P42 Q22 R2 R33

P12 P43 Q23 R3 R34

P13 P44 Q24 R4 R35

P14 P45 Q25 R5 R36

P15 P46 Q26 R6 R37

P16 P47 Q27 R7 R38

P17 P48 Q28 R8 R39

P18 P49 Q29 R9 R40

P19 P50 Q30 R10 R41

P20 P51 Q31 R11 R42

P21 Q1 Q32 R12 R43

P22 Q2 Q33 R13 R44

P23 Q3 Q34 R14 R45

P24 Q4 Q35 R15 R46

P25 Q5 Q36 R16 R47

P26 Q6 Q37 R17 R48

P27 Q7 Q38 R18 R49

P28 Q8 Q39 R19 R50

P29 Q9 Q40 R20 R51

P30 Q10 Q41 R21 S1

P31 Q11 Q42 R22 S2

P32 Q12 Q43 R23 S3


S4 S35 T15 T46 U26

S5 S36 T16 T47 U27

S6 S37 T17 T48 U28

S7 S38 T18 T49 U29

S8 S39 T19 T50 U30

S9 S40 T20 T51 U31

S10 S41 T21 U1 U32

S11 S42 T22 U2 U33

S12 S43 T23 U3 U34

S13 S44 T24 U4 U35

S14 S45 T25 U5 U36

S15 S46 T26 U6 U37

S16 S47 T27 U7 U38

S17 S48 T28 U8 U39

S18 S49 T29 U9 U40

S19 S50 T30 U10 U41

S20 S51 T31 U11 U42

S21 T1 T32 U12 U43

S22 T2 T33 U13 U44

S23 T3 T34 U14 U45

S24 T4 T35 U15 U46

S25 T5 T36 U16 U47

S26 T6 T37 U17 U48

S27 T7 T38 U18 U49

S28 T8 T39 U19 U50

S29 T9 T40 U20 U51

S30 T10 T41 U21 V1

S31 T11 T42 U22 V2

S32 T12 T43 U23 V3

S33 T13 T44 U24 V4

S34 T14 T45 U25 V5


V6 V37 W17 W48 X28

V7 V38 W18 W49 X29

V8 V39 W19 W50 X30

V9 V40 W20 W51 X31

V10 V41 W21 X1 X32

V11 V42 W22 X2 X33

V12 V43 W23 X3 X34

V13 V44 W24 X4 X35

V14 V45 W25 X5 X36

V15 V46 W26 X6 X37

V16 V47 W27 X7 X38

V17 V48 W28 X8 X39

V18 V49 W29 X9 X40

V19 V50 W30 X10 X41

V20 V51 W31 X11 X42

V21 W1 W32 X12 X43

V22 W2 W33 X13 X44

V23 W3 W34 X14 X45

V24 W4 W35 X15 X46

V25 W5 W36 X16 X47

V26 W6 W37 X17 X48

V27 W7 W38 X18 X49

V28 W8 W39 X19 X50

V29 W9 W40 X20 X51

V30 W10 W41 X21 Y1

V31 W11 W42 X22 Y2

V32 W12 W43 X23 Y3

V33 W13 W44 X24 Y4

V34 W14 W45 X25 Y5

V35 W15 W46 X26 Y6

V36 W16 W47 X27 Y7


Y8 Y27 Y46 Z14 Z33

Y9 Y28 Y47 Z15 Z34

Y10 Y29 Y48 Z16 Z35

Y11 Y30 Y49 Z17 Z36

Y12 Y31 Y50 Z18 Z37

Y13 Y32 Y51 Z19 Z38

Y14 Y33 Z1 Z20 Z39

Y15 Y34 Z2 Z21 Z40

Y16 Y35 Z3 Z22 Z41

Y17 Y36 Z4 Z23 Z42

Y18 Y37 Z5 Z24 Z43

Y19 Y38 Z6 Z25 Z44

Y20 Y39 Z7 Z26 Z45

Y21 Y40 Z8 Z27 Z46

Y22 Y41 Z9 Z28 Z47

Y23 Y42 Z10 Z29 Z48

Y24 Y43 Z11 Z30 Z49

Y25 Y44 Z12 Z31 Z50

Y26 Y45 Z13 Z32 Z51

Number of patterns = 1326

You might also like