Skip to content

Latest commit

 

History

History
33 lines (30 loc) · 2.07 KB

01-basic-questions.md

File metadata and controls

33 lines (30 loc) · 2.07 KB

Write programs for the following:

Basic Questions

  1. Given three points (x1, y1), (x2, y2) and (x3, y3), write a program to check if all the three points fall on one straight line.
  2. According to the Gregorian calendar, it was Monday on the date 01/01/1900. If any year is input through the keyboard write a program to find out what is the day on 1st January of this year.
  3. Find the absolute value of a number entered through the keyboard.
  4. Given the coordinates (x, y) of a center of a circle and it’s radius, write a program which will determine whether a point lies inside the circle, on the circle or outside the circle.
  5. Take in two numbers and an operator (+, -, *, /) and calculate the value. (Use if conditions)
  6. Take 2 numbers as input and print the largest number.
  7. Input currency in rupees and output in USD.
  8. To find out whether the given String is Palindrome or not.
  9. To find Armstrong Number between two given number.
  10. To calculate Fibonacci Series up to n numbers.
  11. Write a program to input principal, time, and rate (P, T, R) from the user and find Simple Interest.
  12. Take name as input and print a greeting message for that particular name.
  13. Any integer is input through the keyboard. Write a program to find out whether it is an odd number or even number.
  14. Subtract the Product and Sum of Digits of an Integer
  15. Input a number and print all the factors of that number (use loops).
  16. Take integer inputs till the user enters 0 and print the sum of all numbers (HINT: while loop)
  17. Take integer inputs till the user enters 0 and print the largest number from all.

Intermediate Questions

  1. Calculate Factorial
  2. Calculate Distance Between Two Points
  3. Write a program to print the sum of negative numbers, sum of positive even numbers and the sum of positive odd numbers from a list of numbers (N) entered by the user. The list terminates when the user enters a zero.
  4. Sum Of A Digits Of Number
  5. Check Leap Year Or Not
  6. Check Vowel Or Consonant
  7. LCM Of Two Numbers
  8. HCF Of Two Numbers Program
  9. Reverse A String
  10. Armstrong Number In Java