I'm sure some of us do, but we're not likely to just give it to you just because you ask.
See the intro threads, we don't give free homework.
Show us what you've managed so far, and then we'll help you with the next step.
Create a variable for units and a variable for tens.
Decrement the units variable, then pass each to a subroutine which checks its value and sends out the particular code. If the units variable is zero, it becomes nine and decrement the tens variable.
Thats a Good point, because 8051 micros drive the load only to ground.
In my circuit i have given pull up resistors for the pins which goes to the base of the transistors. So that the transistor works fine for me.
Anyway thanks for your advice, i will implement it and come back.
public class GrossmontBank
//class variables (global - accessible throughout this class)
//scanner object to be used throughout
private static Scanner input = new Scanner(System.in);