Welcome Message

Hi, welcome to my website. This is a place where you can get all the questions, puzzles, algorithms asked in interviews and their solutions. Feel free to contact me if you have any queries / suggestions and please leave your valuable comments.. Thanks for visiting -Pragya.

January 3, 2010

Given a positive number, write a prog to find next multiple of 8

public class NextMultipleOfEight {

public static void main(String[] args) {
int x = 22;
System.out.println((x/8+1) << 3);
}

}

No comments: