You are on page 1of 1

Write a program that tells how many even numbers are there between

1-20.
============================================
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,count=0;

for(a=1;a<=20;a++)
{
if((a%2)==0)
{
cout<<a<<endl;
count++;
}
}

cout<<"\n==================================
=========================================
====";

cout<<"\n\nThere are "<<count<<" Even numbers between


1-20";

cout<<"\n\n================================
=========================================
======";

getch();
}

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006