W.A.P. C++

WAP | CPP | Programs in C++ | C++ Solutions

Snehil Khanor's Binary Log

Write a program to find average of three numbers


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 :)
  1. #include <iostream.h>
  2. #include <conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int a,b,c,d,avg;
  7. cout<<"enter a no. ";
  8. cin>>a;
  9. cout<<"enter another no. ";
  10. cin>>b;
  11. cout<<"enter another nos ";
  12. cin>>c;
  13. //Coding by: Snehil Khanor
  14. //http://WapCPP.blogspot.com
  15. d=a+b;
  16. avg=d/3;
  17. cout<<"The average is "<<s;
  18. getch();
  19. }

0 comments:

Search

About WAP C++

Here you'll find a wide range of programs' solution ranging from beginer level to advanced level.
All programs here are made, compiled and tested by me..and are running absolutely fine.. still if you find any bug in any program do let me know :)

Followers

Subscribe via email

Enter your email address:

Delivered by FeedBurner

my Binary Log

Blog Archive



eXTReMe Tracker