Interview Questions   Tutorials   Discussions   Programs   

C - Write a program for odd numbers?




415
views
asked marvit August 21, 2014 09:20 AM  

Write a program for odd numbers?


           

1 Answers



 
answered By bhjahnavi   0  
/* program for odd numbers from 1 to 100*/
#include<stdio.h>
int main()
{
  int i;
  for(i=1;i<100;i=i+2)
  {
  printf("%d\n",i);
  }
}
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert