Sample Paper - 2015 Class - X Subject - Maths: Other Educational Portals
Sample Paper - 2015 Class - X Subject - Maths: Other Educational Portals
Sample Paper - 2015 Class - X Subject - Maths: Other Educational Portals
com/
{ y = y – 5;
System.out.println(“Value of y = “ + y );
}
else if ( x == 10)
{ y = y – 10;
System.out.println(“Value of y = ” + y );
}
else
{ y = y – 15;
System.out.println(“Value of y = ” + y );
}
(g) Difference between entry & exit controlled loop. [2]
Question 4 [15]
The standard form of quadratic equation is given by: ax2 + bx + c = 0, where d = b2 – 4*a*c , is known
as discriminate which determines the nature of the roots of the equation accordingly :
If d >= 0 Roots are real
If d < 0 Roots are imaginary
WAP in Java to determine the roots of a quadratic equation (if d > 0) taking a, b, c as input, otherwise
roots are Imaginary.
b b 2 4ac b b 2 4ac
Where roots are given by the formula: r1 = , r2 =
2a 2a
Question 5 [15]
In an election, out of 1249 voter in a booth, only 861 voters used their franchise correctly. If five
candidates are contesting, write a program in Java to find:
(i) The number of invalid and valid votes and
(ii) The percentage of the valid votes received by each candidate.
Question 6 [15]
Write a program to input a number and display sum of first and last digit only.
e.g. input num = 3459 output sum = 3 + 9 = 12
num = 568 output sum = 5 + 8 = 13
Question 7 [15]
Write a program to display following series
123454321
1234 4321
123 321
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com |
www.iitguess.com | www.indiaguess.com
http://www.icseguess.com/
12 21
1 1
Question 8 [15]
Write a program to input a no and check no is PalPrime no or not. (PalPrime is a no which Palindrome
as well as Prime)
e.g. 131
---------x---------x----------x---------
www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com |
www.iitguess.com | www.indiaguess.com