The following program finds the sum of three numbers. Modify the program to find the average. . (Average should display fractional part also.)
#include<iostream>
using namespace std;
int main ( )
{
int x, y, z, result;
cout<<“Enter values for x, y, z”;
cin>>x>>y>>z;
result=x+y+z;
cout<<“The answer is =”<<result;
return 0;
}