Three numbers are taken(Input) from the user and avg of these three nos. is calculated(Output).
Select To use this code as it is.. select and copy paste this code into code.cpp file :)
- #include <iostream.h>
- #include <conio.h>
- void main()
- {
- clrscr();
- int a,b,c,d,avg;
- cout<<"enter a no. ";
- cin>>a;
- cout<<"enter another no. ";
- cin>>b;
- cout<<"enter another nos ";
- cin>>c;
- //Coding by: Snehil Khanor
- //http://WapCPP.blogspot.com
- d=a+b;
- avg=d/3;
- cout<<"The average is "<<s;
- getch();
- }
0 comments:
Post a Comment