Simple Programming

I am writing a simple shell program using the

if

then

else

How do I use input in the program without using read?

Well you didn't mention which shell (sh,ksh,etc.)
but you can pass input to a shell script
on the command line as arguments...

read more about:

"$*" ...and... "shift"

...also read through the shell man page
on shell parameters and parameter expansion.