Computer Science, asked by ajayjayalal675, 11 months ago

Find and write the output of the following C++ program code:

Note : Assume all required header files are already included in the
program

void Convert(float &X, int Y=2)
{
X=X/Y;
Y=X+Y;
cout<<X<<"*"<<Y<<endl;
}
void main()
{
float M=15, N=5;
Convert (M,N);
Convert (N);
Convert (M);
}​

Answers

Answered by amruthamanisai587
2

Answer:

3*8

2.5*4

1.5*3

Explanation:

this is the output of the program

please change void main to int main() and add a statement return 0; at end of the block or else there is a chance that you may get the error.

please let me know if you need more clarification on this feel free to text me

Similar questions