is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
public class PowerDouble{
- Rothschild October 31, 2012public static void main(String[] args){
double aNeg = -3.5;
double aZero = 0.0;
double aPos = 5.8;
int bNeg = -3;
int bZero = 0;
int bPos = 5;
System.out.println( pow(aNeg, bNeg) );
System.out.println( pow(aNeg, bPos) );
System.out.println( pow(aPos, bNeg) );
System.out.println( pow(aPos, bPos) );
System.out.println( pow(aZero, bPos) );
System.out.println( pow(aNeg, bZero) );
System.out.println( pow(aZero, bZero) );
}
public static double pow(double a, int b){
double powValue = 1.0;
if ( a == 0.0 )
return a;
else if ( b == 0 )
return 1;
else if( b > 0 ){
while ( b-- > 0)
powValue *= a;
return powValue;
}
else { // b is negative
int negativeIndex = -b;
while ( negativeIndex-- > 0)
powValue *= a;
return (1/powValue);
}
}
}