| Programming Problems |
Article Index for Programming |
Website Links For Programming |
Information AboutProgramming Problems |
|
This page gives a list of Programming problems. These are useful for anyone who wants to learn programming quickly. Each problem has a problem statement and the required output along with multiple solutions (including flawed and ill-performing solutions).
i) Circle ii) Square iii) Rectangle iv) Cuboid v) Sphere vi) Cone vii) Cylinder
Arithmetic • 1, 2, 3, 4, ... • 1, 3, 5, 7, 9, ... • 2, 4, 6, 8, … • 10, 15, 20, 25 … Geometric • 2, 4, 8, 16 … • 10, 100, 1000, 10000, … • 3, 27, 243, …
Ask the user to guess a number between 1 and 100. Try to guess it using the following logic. Say user has chosen number 80 Prog: Is number 50? User: G (My number is greater than that) Prog: Is number 75? User: G Prog: Is number 87? User: L (My number is lesser than that) Prog: Is number 81? User: L (My number is lesser than that) Prog: Is number 78? User: G Prog: Is number 79? User: G Prog: Is number 80? User: Y
Example: Input N is 4219 (say) Output should be 4, 2, 1, 9
Example: The given digits are 4, 2, 1, 9 Output should be 4219
Example: Output should be 9124 given 4219
Input: 7331 (is super prime) Input: 4550 (is not super prime) Hint: 7331 is super-prime because, 7331, 733, 73 and 7 are primes
Hint: A number is Armstrong if the sum of cubes of its digits is equal to the number itself Input: 371 (is Armstrong) Input: 456 (is not Armstrong)
|
|
|