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
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
0
Answer:
qwertyuiopasfdghjklz
Similar questions
Social Sciences,
5 months ago
Math,
5 months ago
Chemistry,
9 months ago
Math,
9 months ago
Math,
1 year ago