Computer Science, asked by bunnyverma580, 1 year ago

write an algorithm to add first 15 even positive integers in c

Answers

Answered by tamil98
0

int n,sum;

for(int i=0;i<=15;i++)

{

if(i%2==0)

{

sum=sum+i;

}

}

printf("%d",sum)

output:

56

Similar questions