Question: what is the output of the following program. #include #include int F ( int n 1 , int n 2 ) { int x ,

what is the output of the following program.
#include
#include
int F(int n1, int n2)
{
int x,y;
x=n1, y=n2;
while (n1!=n2)
{
printf(%d %d
, n1, n2);
if (n1>n2) n1=n1-n2;
else n2=n2-n1;
printf(%d %d
, n1, n2);
}
return x*y/n1;
}
int main()
{
int a=3, b=4, c;
c=F(a,b);
printf(%d
, c);
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!