Code for Summation of an even numbers in C Programming
#include <stdio.h>
#include <conio.h>
void main()
{
int x=0,y=0,n;
clrscr();
printf("Enter the value of n : ");
scanf("%d",&n);
while(x<=n)
{
y+=x;
x+=2;
}
printf("summation of even no up to given no is %d",y);
getch();
}