C++ Programs
| Program to find the average of three numbers. |
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c;
float avg;
clrscr();
cout<<"Enter three numbers";
cin>>a>>b>>c;
avg=(a+b+c)/3;
cout<<"Average is:"<<avg;
getch();
}
| Output: |
Enter three numbers10
11
12
Average is:11
If any of you want to submit your programs and
contribute to site please mail us at:
citysuvidha@gmail.com
Click here to have a look at List of programs
You can download all the programs in a zip file also. For this you have to do one thing. Just register at the citysuvidha forum and start any thread of any topic. Once you start the thread and put your request, admin will automatically send you the desired zip file.