C & C++ language
Home
HTML
C&C++ language
Movies
Games
Softwares
Wednesday, 25 January 2012
SUM AND AVERAGE IN C++
#include<iostream.h>
main()
{
float a, b, sum, average;
cout << "enter the value of a:";
cin >> a;
cout << "enter the value of b:";
cin >>b;
sum=a+b;
average=sum/2;
cout<<"sum:"<<sum<<"\n";
cout<<"average:"<<average<<"\n";
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment