Math, asked by Subhankar2738, 10 months ago

in Q Basic write a program which asks users to enter their lucky number if lucky number greater than 31 then it should display good day and enjoy the day otherwise bad day and be careful​

Answers

Answered by swati4678
6

Answer:

Consider the sequence of natural numbers.

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ………………………………….

Removing every second number produces the sequences

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23 ………………………….

Removing every third number produces the sequences

1, 3, 7, 9, 13, 15, 19, 21, 25 ………………………….

This process continues indefinitely by removing the fourth, fifth…and so on, till after a fixed number of steps, certain natural numbers remain indefinitely. These are known as Lucky Numbers.

Write a program to generate and print lucky numbers less than a given number N.

Step-by-step explanation:

Similar questions