CBSE Class 11 Compter Science Conditional Operator. Students are advised to refer to the attached assignments and practice them regularly. This will help them to identify their weak areas and will help them to score better in examination. Parents should download and give the assignments to their children for practice.

TOPIC: OPERATOR & EXPRESSIONS: CONDITIONAL OPERATOR

1. Write a program to input a number. If it is even, double and print the number otherwise print its half.

2. Write a program to input a character. Print whether it is an alphabet or not using conditional operator.

3. Write a program to input co-efficients of a, b and c of a quadratic equation ax2 + bx + c = 0 ,where a = 0. Discriminant, D = b2- 4ac.If discriminant is 0 then print there is exactly one real root, if discriminant is positive then print there are two distinct roots, if discriminant is negative then print then there are no real roots.

4. Write a program to input income of a person. Calculate tax using following criteria. If income is more than 20000, tax is 15%. Else if income is in the range 5000-20000, tax is 10%. If income is less than 5000, tax is nil.

5. Write program to input three numbers. Print the largest of the three.

Please click the link below to download CBSE Class 11 Compter Science Conditional Operator