Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.51 KB

File metadata and controls

38 lines (27 loc) · 1.51 KB
  1. Define two methods to print the maximum and the minimum number respectively among three numbers entered by user.

  2. Define a program to find out whether a given number is even or odd.

  3. A person is elligible to vote if his/her age is greater than or equal to 18. Define a method to find out if he/she is elligible to vote.

  4. Write a program to print the sum of two numbers entered by user by defining your own method.

  5. Define a method that returns the product of two numbers entered by user.

  6. Write a program to print the circumference and area of a circle of radius entered by user by defining your own method.

  7. Define a method to find out if number is prime or not.

  8. Write a program which will ask the user to enter his/her marks (out of 100). Define a method that will display grades according to the marks entered as below: Marks Grade 91-100 AA 81-90 AB 71-80 BB 61-70 BC 51-60 CD 41-50 DD <=40 Fail

  9. Write a program to print the factorial of a number by defining a method named 'Factorial'. Factorial of any number n is represented by n! and is equal to 123*....(n-1)n. E.g.- 4! = 1234 = 24 3! = 321 = 6 2! = 21 = 2 Also, 1! = 1 0! = 0

  10. Write a function to find if a number if palindrome or not. Take number as parameter.

  11. Convert the programs in flow of program, conditionals & loops, first java assignemts into functions.