[go: up one dir, main page]

0% found this document useful (0 votes)
3 views10 pages

Loops Q.

The document contains a list of programming tasks that involve basic operations, number manipulations, and conversions in Java. It includes tasks such as printing natural numbers, calculating sums, checking for prime and strong numbers, and converting between different number systems. Additionally, it covers string manipulations and the implementation of loops.

Uploaded by

aankhoteriaadat
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)
3 views10 pages

Loops Q.

The document contains a list of programming tasks that involve basic operations, number manipulations, and conversions in Java. It includes tasks such as printing natural numbers, calculating sums, checking for prime and strong numbers, and converting between different number systems. Additionally, it covers string manipulations and the implementation of loops.

Uploaded by

aankhoteriaadat
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/ 10

1.

Write a program to print all natural numbers from 1 to n

2. Write a program to print all natural numbers in reverse

3. Write a program to print tables

4. Write a program to print reverse tables

5. Write a program to print all alphabets from a to z

6. Write a program to print reverse alphabets from Z to A

7. Write a program to print all even numbers between 1 to 100

8. Write a program to print all odd number between 1 to 100


9. Write a program to find sum of all natural numbers between 1 to n

10. Write a program to find sum of all even numbers between 1 to n

11. Write a program to find sum of all odd numbers between 1 to n

12. Write a program to print the ASCII values

13. Write a program to find the factorial value of any number

14. Write a program to find the value of one number raised to the power of
another

15. write a program to reverse the given Digits


16. write a program to sum of its Digits

17. write a program to Check Whether a Given Number is Prime or Not

18. Write a program to calculate HCF of Two given number

19. Write a program to enter the numbers till the user wants and at the
end it should display the count of positive, negative and zeros entered

20. Write a program to enter the numbers till the user wants and at the
end the program should display the largest and smallest numbers entered

21. Write a program to find number and sum of all integer between 100
and 200 which are divisible by 9
22. Write a program to convert a binary number into a decimal number
without using array, function and while loop

23. Write a program to check whether a number is a Strong Number or not

24. Write a program to convert Hexadecimal to Decimal number system

25. Write a Program to convert Hexadecimal to Octal number system

26. Write a program to convert Hexadecimal to Binary number system

27. Write a program to convert Decimal to Hexadecimal number system

28. Write a program to convert Decimal to Octal number system

29. Write a program to convert Decimal to Binary number system


30. Write a Program to convert Binary to Octal number system

31. Write a program to convert Binary to Decimal number system

32. Write a program to convert Binary to Hexadecimal number system

33. Write a program to convert Octal to Binary number system

34. Write a program to convert Octal to Decimal number system

35. Write a program to convert Octal to Hexadecimal number system

36. Write a program to find 1s complement of a number in java


37. Write a program to find 2s complement of a Binary number in java

38. Write a program to print fibonacci series upto n terms

39. Write a program to check Strong numbers or Not

40. Write a program to print All Strong numbers 1 to 100000

41. Write a Program to print All perfect numbers 1 to 10000

42. Write a Program to check perfect numbers or Not

43. Write a Program to print All Armstrong numbers between 1 to 1000

44. Write a Program to check Armstrong numbers or Not


45. Write a Program to print Prime factors in java

46. Write a Program to check Prime numbers or Not

47. Write a Program to print Factors of a Positive Integer

48. Write a Program to print Factors of a Negative Integer

49. Write a Program to Check Given Number is a Palindrome or Not

50. Write a Program to Check Given String is a Palindrome or Not

51. Write Java program to print bits that need to be flipped to convert a
number to another number
52. Write Java program to Count the number of bits to be flipped to
convert a number to another number

53. Write Java program to Round off an integer number to the next lower
multiple of 2

54. Write Java program to Find the position of MSB bit of an integer
number

55. Write Java program to Count the total HIGH bits in the given number

56. Write Java program to Implement infinite loop using do-while loop

57. Write Java program to Implement infinite loop using while loop

58. Write Java program to Implement infinite loop using for loop
59. Write Java program to Print string in hexadecimal format

60. Write Java program to Find the (GCD) Greatest Common Divisor

61. Write Java program to Find the (LCM) Lowest Common Multiple

62. Write Java program to Extract words from a given sentence

63. Write Java program to Print Fibonacci Series

64. Write Java program to Find Factorial of a Number

65. Write Java program to Generate Random Numbers from 0 to given


Range
66. Write Java program to Find addition of N integer numbers

67. Write Java program to count total number of words in a string

68. Write Java program to print used different characters (letters) in a


string

You might also like