#include <stdio.h>
int main()
{
int i, n, sum;
printf("the sum of the odd numbers: ");
scanf("%d",&n);
for(i=1;i<n+1;i= i+2)
{
sum=sum+i;
}
printf("%d\n",sum);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: