0% found this document useful (0 votes)
3 views

ProblemSolving

The document lists 50 basic programming problems for beginners, covering fundamental concepts such as input/output, arithmetic operations, string manipulation, and data structures. Each problem includes a brief description of the task to be accomplished, such as calculating factorials, checking for prime numbers, and sorting arrays. This collection serves as a practical guide for learning and practicing programming skills.

Uploaded by

SUDIP HOWLADER
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

ProblemSolving

The document lists 50 basic programming problems for beginners, covering fundamental concepts such as input/output, arithmetic operations, string manipulation, and data structures. Each problem includes a brief description of the task to be accomplished, such as calculating factorials, checking for prime numbers, and sorting arrays. This collection serves as a practical guide for learning and practicing programming skills.

Uploaded by

SUDIP HOWLADER
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

List of basic programming problems:

1. Hello World Program


 Write a program to print "Hello, World!" on the screen.
2. Sum of Two Numbers
 Write a program that takes two integers as input and prints their sum.
3. Find Maximum and Minimum
 Write a program to ind the largest and smallest of three numbers.
4. Factorial of a Number
 Write a program to ind the factorial of a number using both recursion and iteration.
5. Palindrome Check
 Write a program to check if a string or number is a palindrome.
6. Fibonacci Series
 Write a program to print the Fibonacci series up to a certain number of terms.
7. Prime Number Check
 Write a program to check whether a given number is prime or not.
8. Armstrong Number
 Write a program to check if a given number is an Armstrong number (sum of cubes of digits equals the
number).
9. Reverse a String
 Write a program to reverse a string without using built-in functions.
10. Count Vowels and Consonants
 Write a program to count the number of vowels and consonants in a given string.
11. Sum of Digits
 Write a program to ind the sum of digits of a number.
12. Find GCD and LCM
 Write a program to ind the GCD (Greatest Common Divisor) and LCM (Least Common Multiple) of two
numbers.
13. Pattern Printing
 Write a program to print various patterns, such as:
o Square pattern of stars.
o Right-angle triangle pattern of stars.
o Pyramid pattern of numbers or stars.
14. Armstrong Number (for N-digit numbers)
 Write a program to check if a number is an Armstrong number for N digits.
15. Swap Two Numbers
 Write a program to swap two numbers without using a third variable.
16. Sum of First N Natural Numbers
 Write a program to ind the sum of the irst N natural numbers.
17. Count Digits in a Number
 Write a program to count how many digits are in a number.
18. Even or Odd
 Write a program to check if a number is even or odd.
19. Find the Length of a String
 Write a program to ind the length of a string without using built-in functions.
20. Simple Calculator
 Write a program that performs basic arithmetic operations (addition, subtraction, multiplication, and
division) based on user input.
21. Check Leap Year
 Write a program to check whether a given year is a leap year or not.
22. Power of a Number
 Write a program to calculate the power of a number using recursion (e.g., x^n).
23. Find the Largest Element in an Array
 Write a program to ind the largest element in an array.
24. Sort an Array (Bubble Sort)
 Write a program to sort an array of integers using the Bubble Sort algorithm.
25. Count Occurrences of a Character in a String
 Write a program to count how many times a particular character appears in a string.
26. Find the Second Largest Element
 Write a program to ind the second largest element in an array.
27. Transpose of a Matrix
 Write a program to ind the transpose of a matrix ( lip rows and columns).
28. Remove Duplicates from an Array
 Write a program to remove duplicate elements from an array and print the unique elements.
29. Check for an Anagram
 Write a program to check if two strings are anagrams (contain the same characters in different order).
30. Merge Two Sorted Arrays
 Write a program to merge two sorted arrays into one sorted array.
31. Find the Missing Number in an Array
 Write a program to ind the missing number in a sequence of consecutive numbers.
32. Reverse an Array
 Write a program to reverse an array of integers.
33. Find the First Non-Repeating Character
 Write a program to ind the irst non-repeating character in a string.
34. Check if a Number is a Perfect Number
 Write a program to check if a number is a perfect number (sum of divisors equals the number).
35. Check if a String is a Substring
 Write a program to check if one string is a substring of another.
36. Remove Whitespaces from a String
 Write a program to remove all whitespaces from a given string.
37. Sum of Prime Numbers up to N
 Write a program to ind the sum of prime numbers up to a given number N.
38. Find the Common Elements in Two Arrays
 Write a program to ind the common elements between two arrays.
39. Print Fibonacci Series up to N
 Write a program to print the Fibonacci series up to the Nth term.
40. Decimal to Binary Conversion
 Write a program to convert a decimal number to its binary equivalent.
41. Find the Factorial Using Recursion
 Write a program to calculate the factorial of a number using recursion.
42. Find the Missing Element in an Arithmetic Progression
 Write a program to ind the missing element in an arithmetic progression (AP) series.
43. Bubble Sort Implementation
 Write a program to implement the Bubble Sort algorithm.
44. Check for Balanced Parentheses
 Write a program to check if the parentheses in a string are balanced.
45. Sum of Elements in an Array
 Write a program to ind the sum of all elements in an array.
46. Find the Largest Prime Factor
 Write a program to ind the largest prime factor of a given number.
47. Count the Number of Words in a String
 Write a program to count the number of words in a given string.
48. Find the Missing Character in a String
 Write a program to ind the missing character in a string that should contain all alphabetic characters.
49. Check if a Number is a Strong Number
 Write a program to check if a number is a strong number (the sum of factorials of digits equals the
number).
50. Find the Sum of Two Matrices
 Write a program to add two matrices and print the result.

You might also like