Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions