Professional Documents
Culture Documents
int x = 2, y = 1, z = 4;
while (x < z)
{
z--;
while(y < 1)
{
if ((z > x + y) && (true))
{
for (int i = 12; i <= y*z+(y*x/z*y); i += (z - y))
{
if (!!!true || !!false)
cout << "woops!" << endl;
}
}
z++;
y *= x + (z + 12/4);
}
z++;
x+=y;
y = z / 2;
int x = 1;
while(x=1)
{
x = 0;
while(x=0)
{
x=1;
}
}
-Angry Lawyer
/* Programmer: Gorgon
functions to find the greatest common divisor of 2
integers. The test program should read pairs of numbers
from the standard input and call gcd each time.
*/
#include <iostream.h>
using namespace std;
while(r!=0)
{
q = a / b;
r = a % b;
cout<<a<<"= "<<q<<" * "<<b<<" + "<<r<<endl;
a = b;
b = r;
}
}
//Main programe
int main()
{
int n1=0, n2=0;
the above is a working code I made to get the GREATEST COMMON DIV of 2 numbers
Resolved Question
Show me another »
Implement this function in assembly language and write a test program that calls the function
several times, passing it different values. You can store the test integers in an array. Display
all results on the screen. You output should look as follows:
First integer is: -5 Second integer is: -20 Greatest common divisor is: 5
First integer is: +18 Second integer is: +24 Greatest common divisor is: 6
First integer is: +11 Second integer is: +7 Greatest common divisor is: 1
First integer is: +438 Second integer is: +226 Greatest common divisor is: 2
First integer is: +13 Second integer is: -26 Greatest common divisor is: 13
Press
1 year ago