- Print a square of stars recursively (n×n). [link]
- Take marks (0–100) and print the corresponding grade (A/B/C/D/F). [link]
- Print numbers between 1–100 whose digits add up to a multiple of 3. [link]
- Create a new array containing only even elements. [link]
- Print Repeated Numbers per Row (Same Number Repeated) [link]
- Find the sum of even elements only. [link]
- Merge two arrays into one. [link]
- Replace all even numbers with 1 and odd numbers with 0 in array. [link]
- Find nCr (Combination formula) recursively using Pascal’s relation. [link]
- Print the alphabet incrementing in a left aligned pyramid pattern. [link]
- Find the frequency of each character in a string (without using a map). [link]
- Print Stars in Even Numbers (2, 4, 6, 8, 10) [link]
- Count how many times a number appears consecutively in an array. [link]
- Find element-wise sum of two arrays (A[i] + B[i]). [link]
- Remove consecutive duplicate characters (e.g., "aaabbcaaa" becomes "abca"). [link]
- Print the cube of numbers from 1 to n. [link]
- Check if a number is divisible by 5. [link]
- If the sides form a valid triangle, determine whether it is equilateral, isosceles, or scalene. [link]
- Find product of digits of a number recursively. [link]
- Print all factors of a given number. [link]
- Check if an array is sorted (ascending or descending). [link]
- Count the number of positive, negative, and zero elements in an array. [link]
- Print characters that appear more than once (without map). [link]
- Print all the odd numbers from 1 to 100. [link]
- Reverse an array in-place. [link]
- Take a 3-digit number and determine if the middle digit is the largest, smallest, or neither. [link]
- Count consonants and vowels separately using recursion. [link]
- Print Fibonacci series up to n terms. [link]
- Find the second largest element in an array. [link]
- Count how many positive, negative, and zero elements are in an array. [link]
- Print numbers between a and b divisible by 7. [link]
- Replace all vowels from a string with stars. [link]
- Count vowels in each word of a sentence. [link]
- Reverse a number recursively. [link]
- Print all the numbers from 1 to 100 whose sum is odd. [link]
- Check voting eligibility for a given age (18+). [link]
- Print pattern of numbers recursively (1 to n each row). [link]
- Rotate an array by one position to the left. [link]
- Check if a string is palindrome using recursion. [link]
- Print Increasing Numbers per Row (Same Number Repeated) starting from k. [link]
- Find the index of the minimum element. [link]
- Print the alphaBetic pyramid pattern starting from 'A' in the center of the pyramid without any space. The number of rows is given as input. [link]
- Take a 3-digit number and check if the sum of the first and last digit equals the middle digit. [link]
- Find the last occurrence of a given number in the array. [link]
- Print the count of the numbers between 1 and 500 that are divisible by 7 but not by 5. [link]
- Take a string input and print its length. [link]
- Check if a number is a strong number (sum of factorials of digits = number). [link]
- Check if the array is sorted in ascending order. [link]
- Print multiplication table of n recursively. [link]
- Count the number of digits in a number recursively. [link]
- Print sum of first n terms of Fibonacci series. [link]
- Print the product of digits of a given number. [link]
- Find LCM of two numbers using loops. [link]
- Find the maximum and minimum element in an array. [link]
- Take the hour of the day (0–23) and print “Good Morning”,“Good Afternoon”,“Good Evening”, or “Good Night”. [link]
- Print an Increasing Triangle of Stars [link]
- Replace every negative number with 0 in array. [link]
- Find the maximum element in an array. [link]
- Take a number and print “Fizz” if divisible by 3, “Buzz” if divisible by 5, and “FizzBuzz” if divisible by both. [link]
- Find sum of digits of a number recursively. [link]
- Monthnames [link]
- Calculate the sum of first n odd numbers recursively. [link]
- Take a character and check if it is a letter, a digit, or neither. [link]
- Print NxN star matrix. For example, if the number is 3 then print [link]
- Take a 3-digit number and check if all digits are distinct. [link]
- Print the numbers from 10 to 1 downward. [link]
- Shift all zeros to the end of the array. [link]
- Take three numbers and check if they can form a Pythagorean triplet. [link]
- Check if a number is both divisible by 3 and 5. [link]
- Find the sum of all elements except the largest and smallest. [link]
- Print the sum of first n natural numbers. [link]
- Find the shortest word in a sentence. [link]
- Print only odd numbers from 1 to N using recursion. [link]
- Take three numbers and print the largest number among three. [link]
- Print the reverse of a given number [link]
- Print the frequency of each distinct element. [link]
- Print all characters of a string one by one recursively. [link]
- Print all pairs in an array whose sum equals a given number. [link]
- Check if all elements in an array are unique. [link]
- Take coordinates (x, y) and check if the point lies on the X-axis, Y-axis, or at the origin. [link]
- Find GCD (HCF) of two numbers using Euclid’s algorithm recursively. [link]
- Find elements that are in one array but not in the other. [link]
- Take coordinates (x, y) and determine which quadrant the point lies in. [link]
- Print the even numbers from 1 to 100. [link]
- Print first n terms of an arithmetic progression (a, d). [link]
- Find the second largest element in an array. [link]
- Print pattern of characters (A, AB, ABC, ...) recursively. [link]
- Print a triangle of stars recursively (top-down). [link]
- Reverse the word of a sentence if the length of the word is even. [link]
- Print a multiplication table in a formatted grid (10x10). [link]
- Remove extra spaces between words (normalize spacing). [link]
- Find the index of the maximum element. [link]
- Sumoffirstnnaturalnumbersrecursively [link]
- Swap case: uppercase → lowercase and lowercase → uppercase. [link]
- Reverse the word of a sentence if the length of the word is even. (Another Approach) [link]
- Convert a string to uppercase recursively. [link]
- Reaplacealloccuranceofcharacter [link]
- Print a triangle of stars recursively (bottom-up). [link]
- Swap alternate elements (1st ↔ 2nd, 3rd ↔ 4th, etc.). [link]
- Print all unique elements from an array. [link]
- Take three numbers and check if they are in arithmetic progression. [link]
- Rotate an array by one position to the right. [link]
- Count how many elements are common between two arrays. [link]
- Print a pyramid pattern of numbers starting from '1' in all rows. The number of rows is given as input. [link]
- Take a single digit (0–9) and print its word form (“Zero” to “Nine”). [link]
- Check if a number is a perfect number. [link]
- Check if one of two given numbers is a multiple of the other. [link]
- Count how many times a given element appears. [link]
- Print the middle character(s) of a string. [link]
- Find the sum of odd elements only. [link]
- Print all Armstrong numbers between 1 and 1000. [link]
- Check if a number is even or odd. [link]
- Count how many elements are greater than the average of the array. [link]
- Print each word of a sentence on a new line. [link]
- Merge two arrays into a third array. [link]
- Print the numeric pyramid pattern starting from '1' and ending at '1' without a space. [link]
- Print all elements that appear more than once. [link]
- Take day and month and check if it forms a valid calendar date (ignoring leap years). [link]
- Print the Row wise alphabet incrementing in a left aligned pyramid pattern. [link]
- Count how many elements are even and odd. [link]
- Print all words that start and end with the same letter. [link]
- Take two numbers and print the larger one among two. [link]
- Print Fibonacci series up to n terms recursively. [link]
- Count how many vowels and consonants are in a string. [link]
- Find the HCF (GCD) of two numbers using loops. [link]
- Take 5 numbers as input. If the user enters 0, skip it using continue. At the end, print the sum of all non-zero numbers entered. [link]
- Take two strings and print them concatenated. [link]
- Print all the numbers from 1 to 100 whose sum is even. [link]
- Print the sum of all even numbers up to n using Arithmetic Progression. [link]
- Printcurrentcentury [link]
- Print digits of a number in words recursively (e.g., 123 → “one two three”). [link]
- Find the smallest and largest digit in a given number. [link]
- Check if a number is an Armstrong number. [link]
- Reverse a string without using built-in reverse. [link]
- Swap first and last words in a sentence. [link]
- Check if an amount can be evenly divided into 2000, 500, and 100 currency notes. [link]
- Print even numbers from 1 to N using recursion. [link]
- Count how many substrings start and end with the same character (simple logic). [link]
- Check if two strings are rotations of each other. [link]
- Rotate an array by one position to the right. [link]
- Print factorial of each number from 1 to n. [link]
- Take two numbers and determine whether both are even, both are odd, or one is even and one is odd. [link]
- Printfirstandlastcharacterofstring [link]
- Count how many words contain the letter 'a'. [link]
- Count how many elements are even at an even index. [link]
- Remove the first and last character and print the remaining string. [link]
- Print all the palindromes between 1 and 500 both inclusive. [link]
- Print a pattern where each row i prints i*i. [link]
- Count how many elements are perfect squares. [link]
- Print all prime numbers between 1 and 100. [link]
- Reverse the order of words in a sentence. [link]
- Check whether a string is a palindrome. [link]
- Keep only the first occurrence of each character. [link]
- Write a program to print the increasing and decreasing pattern of stars in each row. The number of rows is given as input. [link]
- Take a weekday number (1–7) and determine if it is a weekday or weekend. [link]
- Find the average of array elements. [link]
- Print the string in reverse order recursively (without using loops). [link]
- Take a character and check whether it’s uppercase, lowercase, a digit, or a special character. [link]
- Print the string after removing all digits. [link]
- Print 0 and 1 in a left aligned pyramid pattern. [link]
- Write a prrogram to print diamond pyramid of stars. n denote the length of upper triangle in diamond. [link]
- Type 2: Write a program to print the increasing and decreasing pattern of stars in each row. The number of rows is given as input. [link]
- Compare two strings lexicographically (like dictionary order). [link]
- Print Stars in Odd Numbers (1, 3, 5, 7, 9) [link]
- Print the alphaBetic pyramid pattern starting from 'A' in the center of the pyramid. The number of rows is given as input. [link]
- Reverse a string using recursion. [link]
- Take income and age, and check if eligible for tax (age > 18 and income > 5 L). [link]
- Print from N to 1 using recursion. [link]
- Print from 1 to N using recursion. [link]
- Check whether a given integer is single-digit, double-digit, or multi-digit. [link]
- Find the minimum element in an array. [link]
- Count the number of digits, letters, and special characters in a string. [link]
- Count vowels in a string recursively. [link]
- Count words that start and end with the same letter. [link]
- Print a pyramid pattern of alphabets starting from 'A' in all rows. The number of rows is given as input. [link]
- Find the sum of digits of a number. [link]
- Print first n terms of a geometric progression (a, r). [link]
- Remove duplicate characters from a string. [link]
- Find nth Fibonacci number recursively (index start with 1). [link]
- Check if two strings are the reverse of each other. [link]
- Print how many words start with a vowel in a sentence. [link]
- Take three numbers and check if they are in geometric progression. [link]
- Check if the given year is a leap year or not [link]
- Remove all spaces from a string. [link]
- Print a line of n stars recursively. [link]
- Reverse each word in a sentence. [link]
- Print the factorial of a given number. [link]
- Take two dates (day and month) and determine which one comes first in the calendar. [link]
- Reverse an array (without using built-in reverse). [link]
- Count how many pairs of elements have a sum equal to a given number k. [link]
- Find the second largest element in an array. [link]
- Find the count of prime numbers in the array. [link]
- Take three sides and check if they form a valid triangle. [link]
- Count how many words are in a sentence. [link]
- Convert all characters of a string to uppercase. [link]
- Find the first occurrence of a given number. [link]
- Print the sum of all odd numbers up to n. [link]
- Replace all spaces in a string with underscores. [link]
- Check if a number is a palindrome using recursion. [link]
- Remove duplicate words from a sentence. [link]
- Print the square of numbers from 1 to n. [link]
- Find the word with maximum vowels in a sentence. [link]
- Print the factorial of a given number N using Recursion. [link]
- Print the sum of all odd digits and even digits separately in a number. [link]
- Print numbers from 1 to 10. [link]
- Create a new array containing squares of all numbers. [link]
- Removealloccuranceofacharacterinastringusingrecursion [link]
- Find the common elements between two arrays. [link]
- Take an alphabet character and check if it lies between ‘a’ and ‘m’ or ‘n’ and ‘z’. [link]
- Print the sum of all even numbers up to n. [link]
- Take time (hours and minutes) and print the smaller angle between the hour and minute hands. [link]
- Print Numbers in an Increasing Sequence (1, 12, 123, 1234, 12345) [link]
- Create a frequency array of numbers (count occurrence of each number). [link]
- Count how many alphabets are before ‘m’ and after ‘m’ in a given string. [link]
- Count how many words have even length. [link]
- Compare two arrays — check if they contain the same elements (ignore order). [link]
- Check if two strings are anagrams (without using collections). [link]
- Check if a number lies within the range [100, 999]. [link]
- Print a Centered Pyramid of Stars [link]
- Print pattern of increasing characters (A, AB, ABC...). [link]
- Calculate power of a number (xⁿ) using recursion. [link]
- Convert all characters of a string to lowercase. [link]
- Print all unique elements (those that occur exactly once). [link]
- Copy one array to another manually. [link]
- Count how many characters (excluding spaces) are in the string. [link]
- Print pattern of numbers recursively (1 to n each row) forming a reverse triangle. [link]
- Print factorial of a number recursively. [link]
- Take n elements and print only those greater than a given value k. [link]
- Check if a number is prime or not. [link]
- Find element-wise product of two arrays (A[i] * B[i]). [link]
- Find the sum of digits of a number (use loop). [link]
- Toggle case for every alternate word in a sentence. [link]
- Find the sum of all elements at odd indices. [link]
- Take a character and check if it’s a vowel or consonant. [link]
- Shift each character by 1 (eg., "abc" becomes "bcd"). [link]
- Print all numbers between 1 and N that are divisible by both 3 and 5. [link]
- Convert a number to binary recursively. [link]
- Find nth Fibonacci number recursively (index start at 0). [link]
- Find the longest word in a sentence. [link]
- Check if a number is a multiple of 7 or ends with 7. [link]
- Take 24-hour time (hours and minutes) and print whether it is AM or PM. [link]
- Given a number print those many stars in a row. For example, if the number is 5 then print *****. [link]
- Swap the first and last elements of the array. [link]
- Count how many times a given character appears in a string. [link]
- Take a 4-digit number and check if the first and last digits are equal. [link]
- Input an element x — check if it exists in the array. [link]
- Reverse only characters, keeping digits in place. [link]
- Count how many uppercase and lowercase letters a string has. [link]
- Check if the number is palindrome. [link]
- Take two numbers and check if both are positive and their sum is less than 100. [link]
- Print the ASCII value of each character in a string. [link]
- Check whether the string is empty or not. [link]
- Print the table of a given number (n × 1 to n × 10). [link]
- Find the sum of all factors of a number. [link]
- Find the sum of all elements in an array. [link]
- Compare two arrays — check if they are equal (same elements & order). [link]
- Print Stars and Spaces Alternating (Stars and Blank Spaces replacing black space with 'b' character) [link]
- Print the second half of the string in reverse. [link]
- Check if a number is an Armstrong number or not. [link]
- Take a number (1-7) and print the corresponding day of the week. [link]
- Take a number and print whether it’s positive, negative, or zero. [link]
- Print all numbers from 1–n whose binary representation has an even number of 1s. [link]
- Capitalize the first letter of each word. [link]
- Remove all spaces from a string recursively. [link]
- Count the number of digits in a given number. [link]
- Print the sum of all odd numbers up to n using AP. [link]
- Reverse string but skip spaces. [link]
- Take a password string and check basic rules (length ≥ 8 and contains at least one uppercase letter, one lowercase letter, and one digit). [link]
- Take an integer (1–9999) and check if the sum of its digits is greater than the product of its digits. [link]
- Take electricity units consumed and calculate the bill as per slabs (using if-else). [link]
- Input n and take n integers into an array; print them. [link]
- Check if the array is sorted in descending order. [link]
- Print a Right-Aligned Triangle of Stars. [link]
- Count how many words end with ‘s’ [link]
- Count how many spaces are there in a sentence. [link]
- Print Increasing Numbers per Row (Same Number Repeated) starting from k and (0<=k<=9). [link]
- Take three numbers and print the median value (neither maximum nor minimum). [link]
- Remove all vowels from a string. [link]
- Find the second smallest element in an array. [link]
- Calculate the sum of first n even numbers recursively. [link]
- Check whether a number is a perfect square (without using the square root function). [link]
- Count how many numbers are divisible by 3 and 5 both. [link]
- Take two angles of a triangle and compute the third angle. [link]
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|