The Output comes correct in some cases and wrong in some..Note: c) is correct 52 is in position 3.... remember the first element in an array is at array[0]
Adding the results of an incremented valueI think this is the crux of the calculation [code]for(int i=0;i<days-1;i++) val*=2;[/code] //for 7 ...
No need of cmath?Apparently your compiler thinks its a different pow to the one defined in cmath. Does it perform the...
Why are my if and else both executing?I don't think your else statement is part of an if statement.
translate this command.As doug4 says && is probably meant to be ||. Given that alp1 is a double type fmod returns the remai...