Before you can use a variable inside your if block , you need to initialize it.
Try this :
double albedo=0;
Instead of :
double albedo;
Keep in mind though that your variable will remain 0 if your condition returns false as you haven't specified an else block.