Write a program to print first N even Number.
Answer:
#include <stdio.h>
#include <stdlib.h>
void main ()
{
int i,n;
clrscr ();
printf(" Program to print out the first n even numbers \n");
for (i=0; i<=20; i+=2)
{
printf (" %d ",i);
}
printf("\n");
getch ();
}
Answer:
#include <stdio.h>
#include <stdlib.h>
void main ()
{
int i,n;
clrscr ();
printf(" Program to print out the first n even numbers \n");
for (i=0; i<=20; i+=2)
{
printf (" %d ",i);
}
printf("\n");
getch ();
}
No comments:
Post a Comment