#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,sum;
sum=0;
printf("Enter the Number : ");
scanf("%d",&n);
for(i=1; i<=n; i++)
{
if(i%2!=0)
sum=sum+i;
}
printf("Sum of all ODD Integers is %d",sum);
}
OUTPUT:
Enter the Number : 10 Sum of all ODD Integers is 25