George developed an blank plan to earn extra money he needed?
Answers
Money denomination program as this question doesn't contain any question.
import java.util.Scanner;
public class MoneyDenominator {
public static void main(String [] args){
//Taking input from the user
Scanner sc = new Scanner(System.in);
System.out.print("Enter the amount: ");
int amount = sc.nextInt();
//Counting notes
int note1000 = amount / 1000;
amount = amount % 1000;
int note500 = amount / 500;
amount = amount % 500;
int note100 = amount / 100;
amount = amount % 100;
int note50 = amount / 50;
amount = amount % 50;
int note20 = amount / 20;
amount = amount % 20;
int note10 = amount / 10;
amount = amount % 10;
int note5 = amount / 5;
amount = amount % 5;
int note2 = amount / 2;
amount = amount % 2;
int note1 = amount;
//Printing the output
System.out.println("The denominations are as follows");
System.out.println("Rs 1000: " + note1000);
System.out.println("Rs 500: " + note500);
System.out.println("Rs 100: " + note100);
System.out.println("Rs 50: " + note50);
System.out.println("Rs 20: " + note20);
System.out.println("Rs 10: " + note10);
System.out.println("Rs 5: " + note5);
System.out.println("Rs 2: " + note2);
System.out.println("Rs 1: " + note1);
}
}