Thursday, December 13, 2012

Find average of two number in c++


#include<iostream.h>
#include<conio.h>
void main()
{
int num1,num2;
float ave;
clrscr();
cout<<"enter the two no\n";
cin>>num1>>num2;
ave=float(num1+num2)/2;
cout<<"The average of two no is = "<<ave;
getch();
}

 

output