Computer Science, asked by swapnilbaviskar1, 8 months ago

Q. Identify the error and rewrite the correct code

#include

#include

void main()

{

clrscr();

int a,b;

cout<<"enter two numbers"

cin>>a,b;

while(a!=b)

{

if(a>b) then

a=a-b;

if(b>a)

b=b-a;

}

cout<<"the gcd of two numbers is:"<
getch()

}

----------------------------------------------------------------

someone please type the complete rectified code !

Answers

Answered by hemanthrocky98
1

Answer:

# include(iostream)

using namespace std;

voidmain()

{

ing a,b;

cout<<" enter two integer no";

cin>>a>>b;

while (a!=b)

{

if (a>b)then

a=a-b;

if(b>a)

b=b-a;

}

cout<<"gcd of 2 numbers is";

return 0;

}

Answered by abhinavyadav55
0

Answer:

qwertyuiopasfdghjklz

Similar questions