• Sashank Villa 4
  • NEWBIE
  • 30 Points
  • Member since 2022

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello I'm running this program in execute anonymous window in dev console and it's giving apex time limit exceeded error.
my code - 

Integer count = 5;
Integer i = 0;
Integer sum=0;

while(i<count){
    sum = sum +i;
}
i++;
system.debug(sum);

I'm unable to figure out the issue, Please help.
Hello I'm running this program in execute anonymous window in dev console and it's giving apex time limit exceeded error.
my code - 

Integer count = 5;
Integer i = 0;
Integer sum=0;

while(i<count){
    sum = sum +i;
}
i++;
system.debug(sum);

I'm unable to figure out the issue, Please help.