ok firstly i was only showing you the method... you are not summing up the first five numbers but printing them.... easily fixed tho.
also on the even condition.... think about it... there are 2 options...
1) condition becomes ii<=(2*number)
2) condition becomes ii<(2*number+1)
Code:
int number,i,ii,sum;
printf("You have chosen option [1].\n");
printf("\n");
printf("Please enter a positive number: ");
scanf("%d",&number);
printf("\n");
printf("The odd integers are: ");
sum=0;
for(i=1; i<(2*number);i+=2)
{
sum+=i;
printf("%d ", i);
}
printf("\n");
printf("The sum is %d\n",sum);
printf("The even integers are: ");
sum=0;
for(ii=2; ii<(2*number+1);ii+=2)
{
sum+=ii;
printf("%d ", ii);
}
printf("\nThe sum is %d\n",sum);