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

CODE Task

The document outlines a series of programming tasks categorized into four sections: Basic, Intermediate, Advanced Logic, and Hard. Each section contains various exercises focused on loops, conditions, and mathematical operations, such as printing patterns, checking properties of numbers, and performing calculations. The tasks are designed to enhance programming skills and problem-solving abilities.

Uploaded by

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

CODE Task

The document outlines a series of programming tasks categorized into four sections: Basic, Intermediate, Advanced Logic, and Hard. Each section contains various exercises focused on loops, conditions, and mathematical operations, such as printing patterns, checking properties of numbers, and performing calculations. The tasks are designed to enhance programming skills and problem-solving abilities.

Uploaded by

gopeshvvyas8402
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Task

🔹 SECTION A: BASIC

1. Print numbers from 1 to 10 using a for loop. 14. Print numbers divisible by 7 between 1–
100.
2. Print numbers from 10 to 1 in reverse.
15. Count numbers divisible by 5 in range 1–
3. Print even numbers between 1 to 50.
100.
4. Print odd numbers between 1 to 50.
16. Print square of numbers from 1 to n.
5. Count how many even numbers exist from 1
17. Print cube of numbers from 1 to n.
to n.
18. Find largest among two numbers.
6. Count how many odd numbers exist from 1
to n. 19. Find largest among three numbers using if.

7. Find sum of numbers from 1 to n. 20. Find smallest among three numbers.

8. Find sum of even numbers from 1 to n. 21. Print all numbers between two given
numbers.
9. Find sum of odd numbers from 1 to n.
22. Print numbers divisible by both 2 and 3.
10. Check if a number is positive, negative, or
zero. 23. Check if number is even or odd.

11. Print multiplication table of a number. 24. Find sum of digits of a number (using loop).

12. Find factorial of a number using loop. 25. Reverse a number using loop.

13. Check if a number is divisible by 3 and 5.

🔹 SECTION B: INTERMEDIATE

26. Check if a number is palindrome. ****


***
27. Check if a number is prime.
**
28. Print all prime numbers from 1 to n. *

29. Count number of prime numbers in range. 33. Print numbers in triangle form.

30. Print Fibonacci series up to n terms. 34. Print multiplication table from 1 to 10.

31. Print pattern: 35. Find sum of factorials from 1 to n.

* 36. Find sum of digits of all numbers from 1 to


** n.
***
37. Count how many numbers are divisible by 3
****
but not 5.
32. Print reverse pattern:
38. Print all Armstrong numbers from 1 to n.
Task

39. Check if a number is Armstrong. 46. Check if a number is perfect number.

40. Find GCD of two numbers using loop. 47. Print all perfect numbers from 1 to n.

41. Find LCM of two numbers using loop. 48. Print alternate numbers from 1 to n.

42. Print table only for even numbers from 1 to 49. Find sum of first n natural numbers divisible
n. by 3.

43. Find difference between sum of even and 50. Print pattern:
odd numbers.
1
44. Count digits of a number. 12
123
45. Find sum of squares of digits.
1234

🔹 SECTION C: ADVANCED LOGIC

51. Print pattern: 62. Find average of n numbers.

1234 63. Print numbers where sum of digits is even.


123
64. Print numbers where product of digits is
12
odd.
1
65. Find sum of numbers divisible by both 3 and
52. Print pyramid:
7.
*
66. Print numbers whose reverse is same
***
(palindrome range).
*****
******* 67. Count how many palindrome numbers exist
in range.
53. Print inverted pyramid.
68. Find largest digit in a number.
54. Print hollow square using if and for.
69. Find smallest digit in a number.
55. Print hollow triangle.
70. Check if all digits are even.
56. Print diamond pattern using loops and
conditions. 71. Check if all digits are odd.

57. Find sum of numbers until user enters 0. 72. Print numbers where first and last digit are
same.
58. Count how many inputs are greater than 50.
73. Swap first and last digit of a number.
59. Find maximum among n numbers entered.
74. Remove last digit repeatedly using loop.
60. Find minimum among n numbers entered.
75. Check if number contains digit 5.
61. Count positive, negative, and zero inputs.
Task

🔹 SECTION D: HARD

76. Print all numbers between 1–n that are 85. Print zig-zag pattern using conditions.
divisible by 2, 3, and 5 (using nested if).
86. Find second largest number in n inputs.
77. Print pattern:
87. Find second smallest number in n inputs.
A
88. Count numbers greater than average.
BB
CCC 89. Find sum of numbers until negative number
DDDD appears.

78. Print numeric palindrome pattern: 90. Print numbers whose square is even but
cube is odd (logic).
1
22 91. Print numbers divisible by sum of their
333 digits.
4444
92. Print numbers whose digit sum is prime.
79. Find sum of all prime numbers between 1 to
93. Print all numbers with exactly 3 divisors.
n.
94. Print pattern:
80. Count how many Armstrong numbers exist
between 1–1000. *
22
81. Find sum of factorial of each digit of a
***
number.
44 44
82. Check if a number is strong number.
95. Print hollow pyramid pattern.
83. Print all strong numbers from 1 to n.
96. Count frequency of a specific digit in a
84. Print pattern: number.

1 97. Replace all 0 digits with 1 in a number.


01
98. Find sum of alternate digits.
101
0101 99. Print numbers where digits are in increasing
order.

100. Print numbers where digits are in


decreasing order.

You might also like