#include<iostream.h>
//using namespace std;
void main()
{
float x,y,s,a;
cout<<"Enter the number : "<<"\n";
cin>>x>>y;
s=x+y;
a=s/2;
cout<<"\nSum = "<<s;
cout<<"\nAvg = "<<a;
}
OUTPUT:
Enter the number: 10
10
Sum = 20
Avg = 10
//using namespace std;
void main()
{
float x,y,s,a;
cout<<"Enter the number : "<<"\n";
cin>>x>>y;
s=x+y;
a=s/2;
cout<<"\nSum = "<<s;
cout<<"\nAvg = "<<a;
}
OUTPUT:
Enter the number: 10
10
Sum = 20
Avg = 10
No comments:
Post a Comment