Hello!
First, there are many things we need to know to answer.
The only accurate information is PIC18F4550
- Where and how do you want to display data? On an LCD? What kind of LCD?
On a 7 seg display? Etc...
- Are you using a PIC board (standard), or is it a home brew hardware? In this latter
case, where is the switch wired and how? Pull up or down?
Now if you are using a standard board, you can certainly find some code and start from there.
And once you wrote, compiled and loaded the program on your target, tell us accurately
what works and what doesn't.
As you are new to programming, you should start with simple tasks before doing this.
Are you able to blink a LED? If yes, are you able to write a number on a 7 seg display?
ETC...
What I mean is that nobody is going to make your homework for you, you have to pull
your hands out of your pockets, roll your sleeves and do something.
Dora.