0% found this document useful (0 votes)
1 views2 pages

Codelab Question

The document presents a series of programming problems related to various mathematical concepts and logic. Each problem requires the development of a program to solve specific tasks, such as identifying defective speed meters, checking properties of numbers (like Harshad and Sastry numbers), and calculating discounts. The problems range from simple arithmetic to more complex number theory challenges.

Uploaded by

divi131202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Codelab Question

The document presents a series of programming problems related to various mathematical concepts and logic. Each problem requires the development of a program to solve specific tasks, such as identifying defective speed meters, checking properties of numbers (like Harshad and Sastry numbers), and calculating discounts. The problems range from simple arithmetic to more complex number theory challenges.

Uploaded by

divi131202
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

PRACTICE PROBLEM

Q1. Neon Circuit Race:


There is a car race held between 5 Racers. While racing the speed of each car was
being calculated by a speed-o-meter. Each speed-o-meter shows value as
20,25,23,24,26 m/s at a specific time. Unfortunately one of those meters came out
to be defective and was showing the wrong value but it's not clear which one. As a
judge, you have given the average speed and index of the wrong meter as inputs.
Write a program to find the correct speed of the car with a defective meter.

Q2. Magic Show:


In a magic show, Magician shows you a card trick. He chooses some 4 digit number
which he shows to you. He told you that if the sum of each digit's raise to power 3
is equal to the same number, he wins. You have to write a program to take numbers
from the magician and tell him if he wins the game or not.

Q3. Alternate prime number

You are in a maths test, your teacher gives you a problem to write all the
alternate prime numbers between 100 and 120. Write a program to solve the problem.

Q4. Marks can’t be wrong


You are a teacher at a high school. You are entering marks of students, accidently
all marks converted into binary
form. Write a program to convert binary marks into decimal form.

Q5. OFF! OFF! OFF!


You are in a shopping mall. Mall offers n% of discount on products. Write a program
to take the original price and discount and print discounted prices.

Q8. Nth Prime Number

In a Magic show, they make a special entry and exit system. At the time of entry
they give you a integer number (n) and at the time of exit, you have to enter
nth prime number (1st prime number is 2). Write a program for everyone which finds
the nth prime number, so that everyone can exit successfully.

Q9. Harshad Number


In a high school Maths test, you have to find whether the given number is Harshad
Number or not.
A number is said to be Harshad if it's exactly divisible by the sum of its digits.
Write a program to pass your maths test.

Q10. How much time did you save?


Kawaii is on a trip. He wants to save time on his journey to enjoy other stuff, so
he drives faster than the speed limit. You have given speed limit, speed he
travelled
and distance traveled with his speed. Write a program to tell how much time he
saved.

Q11. Sum of Odd and Even


Write a program to find the sum of odd and even numbers between two given numbers.

Q12. Sastry Number


Help CatsB to find whether a given number is a Sastry Number or not. If the number
resulting from the concatenation of an integer n with its successor is a perfect
square,
then n is a Sastry Number.
example: 183 => 183184 is a perfect square => Yes

Q13. Pico is on a top secret mission, To get a secret file which Mr. Bull has
locked in a Briefcase. To open the briefcase, Pico need a 3 digit pass key.
There are certain random equation written. On solving it, you will get the pass
key.
Equations are:
x+y+z = 9
x+z = 5
y+z = 7

You might also like