Basic Programming Questions and Solutions

In this article, We will discuss  C | Java | C++ | Python Basic programs with Output.


1. Write a program to display your name and some Message or write a  program to display your name on Screen.

2. Write a program for addition multiplication and an average of two numbers.


3. Write a Program to find the square root of a number.

4. Write a Program to calculate speed in km/hr.

5. Write a Program to convert seconds to an hour, minute, and seconds.

6. Write a Program to enter basic salary and calculate the gross salary of an employee.

7. Write a program to calculate Simple Interest.

8. Write a program to calculate compound interest.

9. Write a Program to convert Temperature from degree Celsius to Fahrenheit.


10. Write a Program to convert temperature from Fahrenheit to Celsius.


11. Write a program to convert kilometers into miles and meters.


12. Write a program to convert Days into years, weeks, and months.


13. Write a program to swap two numbers using a third variable.


14. Write a program to swap two numbers without the third variable.


15. Write a program to swap three numbers.


16. Write a program to the square of a number.


17. Write a program to input marks of five subjects and calculate total marks, Average marks, and percentage.

18. Write a program to print 1 to 100.


19. Write a program to print A to Z.


20. Write a program to print a to z(small).


21. Write a program to print all the odd numbers up to n.


22. Write a program to print all the even numbers up to n.


23. Write a program to check a year is a leap year or not.


24. Write a program to print whether the given number is odd or even.


25. Write a Program to print whether a Letter is a vowel or consonant.


26. Write a program to print the Ascii values of a character. 


27. Write a program to check whether a given number is positive or negative.


28. Write a program to find the Biggest of three numbers. 


29. Write a Program to calculate the Multiplication Table


30. Write a program to find the smallest of the three numbers


31. Write a program to check whether a given Character is an Upper case, Lower case, Number, or Special Character.


32. Write a program to calculate the area of a rectangle and the perimeter of a rectangle. 

33. Write a Program to Calculate the area and perimeter of a circle.

34. Write a Program to Calculate the area and perimeter of a square.

35. Write a Program to compute the area and perimeter of the Hexagon.

36. Write a Program to compute the area and perimeter of the Heptagon.

37. Write a Program to compute the area and perimeter of the Octagon.

38. Write a Program to compute the area and perimeter of the Rhombus.

39. Write a Program to compute the area and perimeter of the pentagon.

40. Write a Program to compute the area of the Trapezoid.

41. Write a Program to compute the perimeter of the Trapezoid.

42. Write a Program to Calculate the surface area and volume of a sphere.

43. Write a Program to Calculate the surface area and volume of a Hemisphere.

44. Write a Program to Calculate the surface area and volume of a cylinder.

45. Write a Program to Calculate the surface area and volume of a cuboid.

46. Write a Program to Calculate the surface area and volume of a cone.


47. Write a program to add between 2 numbers without using arithmetic operators.

48. Write a Program to multiply two numbers without using the multiplication operator.

49. Write a Program to Subtract Two Numbers Operator without using Minus(-) operator.

50. Write a Program Division Two Numbers Operator without using Division(/) operator.

Post a Comment

2 Comments

Please do not Enter any spam link in the comment box