+ 2
Rakhi Mittal
Because
You are not taking input inside loop
You are not adding input value inside loop
Even numbers are those numbers which are multiple of 2 and returns reminder 0.
https://code.sololearn.com/cncApccD9EPR/?ref=app
If you don't want to take input then do this:
int i = 1, sum;
do {
printf("the value of i is %d\n",i);
if(i % 2 == 0) {
printf("it is even number\n");
sum += i;
} else {
printf(" it is odd number\n");
}
i++;
} while(i <= 10);
printf(" sum of even no. is %d", sum);