C program to find the GCD and LCM using pointers
Here is a C program to find the Greatest common devisor and the Least common multiple of a number.
#include<stdio.h>
void gcdlcm(int num1,int num2,int*gcd,int*lcm)
{
int i,max;
max=(num1>num2)?num1:num2;//Simple way of saying if num1 is great...
gagang.hashnode.dev1 min read
--
lcm is wrong lcm = (num times num2) / (**gcd)