0% found this document useful (0 votes)
6 views3 pages

Important Practice Questions

The document lists a series of programming tasks and problems, primarily focusing on basic mathematical operations, number properties, and pattern printing using various control structures in programming. It includes tasks such as checking number properties (positive, even, prime), finding GCD/LCM, and generating patterns with loops. Additionally, it references specific LeetCode and test problems related to these concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Important Practice Questions

The document lists a series of programming tasks and problems, primarily focusing on basic mathematical operations, number properties, and pattern printing using various control structures in programming. It includes tasks such as checking number properties (positive, even, prime), finding GCD/LCM, and generating patterns with loops. Additionally, it references specific LeetCode and test problems related to these concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1. Check whether the given number is positive or negative.

2. Check whether the given number is even or odd without modulo operator.

3. Check whether the given number is divisible by 3 and 5.

4. Find the largest of three numbers.

5. Check whether the given number is a prime number.

6. Check whether the given number is a prime number within a range.

7. Find the largest number among n numbers using a nested if-else.

8. Print all prime numbers in a range using nested loops.

9. Find all the divisors of a number.

10. Find the GCD and LCM of two numbers.

11. Implement a simple calculator using switch case.

12. Convert a number to its word equivalent (1 to 10) using switch.

13. Find the day of the week using switch statement.

14. Find the factorial of a number.

15. Print Fibonacci series up to n terms using for loop.

16. Find Sum of digits of a number using a for loop.

17. Print prime numbers up to a given number using for loop.

18. Program to Reverse a number.

19. Check whether a number is prime or not using a for loop.

20. Print a pattern of stars using do-while loop.

21. Print Sum of all the digits of a number using do-while loop.

22. To find the ambicable number.

23. Reverse a string using do-while loop.

24. Print all numbers divisible by 5 within a range using do-while.

25. Print a multiplication table using nested loops.

26. Print an inverted triangle pattern using nested loops.

27. Print a pyramid pattern using nested loops.

28. Find the triperfect number.

29. Print a diamond shape pattern using nested loops.

30. Print a hollow square pattern using nested loops.

31. Print a number triangle using nested loops.


32. Count the number of digits in a number.

33. Reverse a number using while loop.

34. To find the perfect square of the number

35. Find the largest prime number in a given range using do-while.

36. To print the X cross pattern.

37. Print the pyramid pattern and inverted pyramid pattern.

38. Write a program to shift the elements in the array.

39. Write a program to reverse the elements in an array.

LeetCode problem:

258

2652

1486

2114

2520

118

3024

Test problem:

1. java_PAT_L0_2.Right Angle star Patterns

2. java_PAT_L1_10.NP_COL

3.java_PAT_L0_4.Inverted Pyramid

4.java_PAT_L1_1.star pattern - double Right Arrow

5.java_PAT_L0_3.Pyramid Pattern

6.java_PAT_L1_9.NP_RIGHT_TRI

7.java_PAT_L0_6.star pattern-single right at row

8.java_NB_L0_2.Factor Count

9.java_NB_L0_6.amicable pair(java)

10.java_NB_L1_9.Triperfect number

11.Java_NC_L0_4.Number of occurrence

12.Java_NC_L1_3.Anagram
13.java_NB_L0_3.sum of factors

14.java_NB_L0_7.BETROTHED NUMBER(java)

15.java_NB_L1_4.Greatest Prime Factors

16.Java_NC_L0_10.Digit odd or even

17.Java_NC_L1_5.Armstrong Number

18. JAVA_LOOP_L0_2.Sum of First N odd number

19. JAVA_LOOP_L0_5.FACTORIAL

20. JAVA_LOOP_L1_5.Quotient

21. JAVA_LOOP_L1_1.Perfect Square-SVCK

22. java_NB_L0_5.ABUNDANT,PERFECT,DEFICIENT NUMBER

23. JAVA_LOOP_L0_1.Numbers

24. JAVA_LOOP_L0_6.Power Problem

25. JAVA_LOOP_L1_6.Multiplication

26. JAVA_LOOP_L1_2.perfect cube

You might also like