Write a Program To Print First 10 Even Number And Their Sum Through For Loop
#include<stdio.h>
#include<conio.h>
int main ()
{
int i, sum=0;
for(i=2; i<=10; i++)
{
sum=sum+i;
printf(" %d\n",i);// this shows output of 1st ten even numbers
}
printf("******************************\n\n");
printf("Sum of 1st ten even numbers is =%d\n", sum);
getch();
}