#include
#include
#include
int getGCD(int a, int b){
if(a > b){
if(a % b 0){
return a;
}
else{
a = b % a;
getGCD(a, b);
}
}
}
int main()
{
int x, y;
cout << "Please enter two integers x and y, for GCD calculation" << endl;
cin >> x >> y;
cout << "The GCD of " << x << "and " << y << " is" << getGCD(x, y) << endl;
getch();
return 0;
}
swap (int *a, int *b) { *a ^= *b; *b ^= *a; *a ^= *b; }
program to find maximum of two numbers using pointers
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
#include<
write an assembly language program to find sum of N numbers
To write a C++ program to display the student details using class and array of object.
This is not a question.
give an example of calculation of mathematics
not possible dude
i need this answer
12
To write a program that calculates the factorial of a number in PHP, you can use a recursive function or an iterative approach. Here’s a simple example using a loop: function factorial($n) { $result = 1; for ($i = 2; $i <= $n; $i++) { $result *= $i; } return $result; } echo factorial(5); // Outputs: 120 This code defines a function that multiplies numbers from 2 up to the given number $n to compute the factorial.