Basic Java Problems


Tasks

  1. Print prime numbers form 2 to 100
  2. Write a program that will count number of notes from given array [1000,500,200,100,50,20,10,5,2,1]
Input: 562
Output: 
500 1
50 1
10 1
2 1
  1. Find out sum of digits of a number
Input: 152
Output: 8
  1. Count Vowels and consonants from a word
Input: Dhaka
Output:
Vowel: 2
Consonant: 3
  1. Encrypt word when A=E
Input: Apple
Output: Fuuqj
  1. Create a program which will take input from users for registration and save the info to a json file. The system will require following user info: Full Name, email, password, address, mobile no.