write an algorithm to add first 15 even positive integers in c
Answers
Answered by
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
Sociology,
6 months ago
Math,
6 months ago
India Languages,
6 months ago
English,
1 year ago
Math,
1 year ago