All questions
- Write a program to check whether an inputted number is prime or not. Answer: A number n ≥ 2 is prime if no number from 2 to √(n) divides it. Logic: numbers less than 2 are not prime. Otherwise test divisors i... 2
- Write a program to compute sum of series. s = 1+ (1 / 2) + ( 1 / 3 )+ ( 1 / 4 )+ ( 1 / 5 )+………+ ( 1 / n ) Answer: Add 1.0/i for i = 1 to n; for the modified series keep a running factorial (fact = fact × i) and add 1.0/fact. Logic: Series 1: s =... 2
- Write a program to display patterns by accepting row number as an input. Pattern 1 1 1 2 1 2 3 Answer: Pattern 1 prints the column number j in row i; Pattern 2 (the modification) prints the row number i instead of j. Logic: the outer l... 2
- Write a program to find permutation and combination values. Answer: Use a factorial function: ⁿP_r = n!/((n-r)!) and ⁿC_r = n!/(r! (n-r)!). Logic: a function fact() returns n! using a loop. The progra... 2
- Write a program to check type of triangle and to evaluate its area. Answer: Check the triangle inequality, classify by comparing sides (equilateral/isosceles/scalene) and find area with Heron's formula. Logic... 2
- Write a program to compare two integer numbers using if-else statement Answer: Read two integers and compare them with an if – else if – else ladder. Logic: if a > b, a is greater; else if a < b, b is greater; o... 2
- Write a program to swap two inputted integer numbers using third variable without using third variable Answer: Swap with a temporary variable (t = a; a = b; b = t;) or without one (a = a + b; b = a - b; a = a - b;). Logic: Using a third variab... 2
- A cube 25 mm edge is placed centrally on the top of another square block of 40 mm edge and 15 mm thick. (i) Draw two isometric axes AB and AD of length 40 mm, each making an angle of 30° with the horizontal line. Draw BC and CD parallel to AD a... 1
- The front and top views of a straight line PQ measures 50 mm and 65 mm, respectively. Answer: True length of PQ ≈ 74 mm, θ (with H.P.) ≈ 28.5°, φ (with V.P.) ≈ 47.5°. HT coincides with p (20 mm in front of V.P.); VT is about 1... 1
- Draw the projections of following points on a common reference line keeping the distance between their Answer: Draw the reference line XY and four projectors 30 mm apart. For each point mark the front view (a′, b′ …) from the H.P. distance and... 1
- A line AB, 70mm long, has its end A 15mm above HP and 20mm in front of VP. Answer: Front view a′b′ = 49.5 mm at 45° to XY, top view ab = 60.6 mm at about 54.7° to XY, end projectors 35 mm apart; HT is about 1.2 mm b... 1
- The distance between the end projectors of a line AB is 40 mm. The end point A is 15 mm above HP and 20 m in from
- The F.V. and T.V. of a line AB measures 50 mm and 60 mm respectively. The line is 70 mm long.
- Draw a helix of pitch equal to 70 mm on a cylinder of 60 mm diameter Answer: Divide the circumference and the pitch into the same number of equal parts (say 12) and join the points where the matching projector... 1
- A wheel of 56 mm diameter rolls downwards on avertical wall for half revolution and then on the horizontal floor
- Which hydrocarbon possess carcinogenic property ? Benzene is the hydrocarbon said to possess carcinogenic property. 1
- Inner surface of mouth Answer: Squamous epithelium (stratified squamous epithelium) The inner surface (lining) of the mouth is covered by squamous epithelial tissu... 1
- Tissue joining two bones Answer: Ligament A ligament is a connective tissue that joins one bone to another bone at a joint. It is made mostly of strong collagen fibr... 1
- Building your own business is the best way to become rich. Then you can begin investing in other assets Building your own business is the best way to become rich. Then you can begin investing in other assets 1
- Write a program in HTML for the following output ask your question 1
- You are going to speak in your school assembly convincing junior students Good morning Respected Principal , teachers and all my dear friends, I , Hardik , am here to talk to you about "the spirit of giving". It is... 1
- Explain types of nerve cell Three types of nerve cell Sensory neurons: They conduct impulses from the sensory organs to the brain and the spinal cord. Motor neurons : T... 1
- Explain the Dulong’s formula Answer: Dulong's formula gives the theoretical calorific value of a fuel from its percentage composition: HCV=1/100[8080 C+34500(H-O/8)+2240... 1
- Give a brief account of proximate analysis of coal . Answer: Proximate analysis of coal finds the percentages of moisture, volatile matter, ash and fixed carbon in a coal sample. It is a simple... 1