- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
Solving the greatest common divisor using C++ and the Euclid method Below is my code: #include "stdafx.h" #include "genlib.h" #include "simpio.h" #include "math.h" int _tmain(int argc, _TCHAR* argv[]) { int num1,num2,rem; printf("Enter 1st number: "); num1=GetInteger(); printf("Enter 2nd number: "); num2=GetInteger(); rem=num1%num2; ;if(rem==0) { printf("The GCD of %d and %d … | |
Re:
Write a C program to solve the Greatest Common Divisor, according to the brute-force The output should appear as the following example: 1st number = 37 2nd number = 11 The GCD of 37 and 11 is 1. Press any key to continue_ thank you, | |
I have input stream problem where my Console::ReadLine() command gets "eaten" when I try to loop my program back to start. Here is the code [code=c] #include "stdafx.h" using namespace System; int factorization(); int main(array<System::String ^> ^args) { int terminate; do{ terminate = factorization(); }while(terminate == 'y' || terminate == … |