Shift Operator Queue

Hey Guys, I'm sorry before.

I don't know about Shift Operator. I got task to write a program using queue for Shift Operator.

This is example from my lecturer :

Input Decimal Number : 25
Input Shift : 3
Output Number : 7

How it work?
I am not sure what you want to achieve.

Shift number 1 by number 2 times?

like shift 25 3 times, in the example you gave above?
If that is the case then you need to use the right shift (>>) operator since you want to reduce the value.

But then 25 >> 3 does not equal 7 it should be 3, and I didn't get what you mean by "queue for Shift operator"

Topic archived. No new replies allowed.