Interview Questions   Tutorials   Discussions   Programs   

C - Write a program for even numbers?




389
views
asked marvit August 21, 2014 09:24 AM  

Write a program for even numbers?


           

1 Answers



 
answered By bhjahnavi   0  
/* program for even numbers from 2 to 100*/
#include<stdio.h>
int main()
{
  int i;
  for(i=2;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