# Trying to look at only at the number in the "ones" digit place

Paul Hobson

Greenhorn

Posts: 4

posted 12 years ago

I have a some numbers, all of them ranging from 1-100. Is there a code to look at only the number in the one's place. like for the number 96; make it only look at the number six. like i want to make a variable equal to whatever number is in the one's place. if anyone knows how to do this it would be greatly appreciated.

Wayne L Johnson

Ranch Hand

Posts: 399

Mani Ram

Ranch Hand

Posts: 1140

posted 12 years ago

Looks like a home work!

Here is a hint: Use

Originally posted by Paul Hobson:

I have a some numbers, all of them ranging from 1-100. Is there a code to look at only the number in the one's place. like for the number 96; make it only look at the number six. like i want to make a variable equal to whatever number is in the one's place. if anyone knows how to do this it would be greatly appreciated.

Looks like a home work!

Here is a hint: Use

*Modulo Division*

Mani
*Quaerendo Invenietis*