Pages

Tuesday, February 9, 2016

C program to print series 1 3 5 7... 19 using do..while loop.

#include<stdio.h>
int main()
{
int number=1;
do
{
printf("%d ", number);
number = number + 2;
while(number < 20);
  
  return 0;
}

Output of program

1 3 5 7 9 11 13 15 17 19


No comments:

Post a Comment