Sunday, 8 January 2017

UGC Net Computer Science Paper 1 December 12 , Page 2-Solved

UGC Net Computer Science Paper 1 December 12 , Page 2-Solved

UGC Net Computer Science Paper 1 December 12 , Page 2-Solved

11. The sum of the ages of two persons A and B is 50. 5 years ago, the ratio of their ages was 5/3. The present age of A and B are
(A) 30, 20
 (B) 35, 15
(C) 38, 12
 (D) 40, 10
Answer A
Explanation :-
Equations:
a + b = 50
(a-5)/(b-5) = 5/3
-------
For solve this expression we need to change a with b

a = 50-b

(50-b-5)/(b-5) = 5/3
----
3(45-b) = 5(b-5)
135 - 3b = 5b - 25
8b = 160
b = 20
Then a = 30

12. Let a means minus (–), b means multiplied by (x), C means divided by (/) and D means plus (+). The value of 90 D 9 a 29 C 10 b 2 is
(A) 8 
(B) 10
(C) 12 
(D) 14
Answer Incorrect
Explanation :-
a = -
b = *
c = /
d = +

90 D 9 a 29 C 10 b 2

90 + 9 - 29 / 10 * 2
90+9-2.9*2
90+9-5.8
93.2

Friday, 6 January 2017

Write a program to check whether a number is perfect or not ?

Question : Write a program to check whether a number is perfect or not ?

(A number said to be  perfect if sum of all factor  less than given number then equal to given number)
Input : 6
Output : Perfect Number

Write a program to check whether given number is Magic or not?

Question : Write a program to check whether given number is Magic or not?

A Magic number said to be a magic when we add each digit until its reached less than 10 after that  if value is 1 then number is Magic.
Example :
    28 = 2+8
         =10
     10= 1+0
         =1 

Write a program to find the following pattern ?

Question : Write a program to find the following pattern?

input : Ashok Kumar Yadav
Output: A.K. Yadav