#include<iostream.h>
#include<conio.h>
#include<conio.h>
void main()
{
clrscr() //to clear the screen
float a,b,c,sum,av;
cout<<“Enter three numbers:”;
cin>>a>>b>>c;
sum=a+b+c;
av=sum/3;
cout<<“nSUM=”<<sum;
cout<<“nAverage=”<<av;
getch(); //to stop the screen
}
Thx buddy u help me alot….!!
In collage assingment…!
@dkpreet thanks……..keep visiting……….
Thanks for your helpful answer…
please post one output for every program
bro it will be of great help if u xplain it a bit … means the commands n functions what does they stand for ??
if there is void main then what is the need of getch If we type void main() we need not type getch
Getch is used to hold the screen
write the program ave of 5 numbers in simple cpp using cin cout
system will pause if you use getch i think
Write a program in c read 3 numbers sum and average.
Nice programs
please write a program class tollbooth. with three members. 1. payingcar() increments car total and adds 50 shillings to the total cash collected,2nopaycar() increments the car total and adds nothing to the total cash,3.display() displays the two totals.the program should allow the user output total cars and cash and exit. thanks i like your work
Buddy..Please Post a simple program to the sum abd average of three numbers very simply bcs i am in 7th std…i need that quickly plz help
It is the simplest way.
Hey could you please let me know how to get this code running in codeblocks? I have a problem running your cpp programs in CodeBlocks IDE. C works fine, just that I am unable to run C++ programs. Even #include is being read as a fatal error.
Thanks in advance!
Excellent…..