

Hi likitha,Please refer to my code below:public class QUES { public static void addOddNum(){ Integer n =50; Integer sum=0; while(n>0){ if(math.mod(n,2)==1){ System.debug(n); } n=n-1; } }}I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.Thanks and Regards,Deepali Kulshresthawww.kdeepali.com