#include<stdio.h>
int gcd(int n1,int n2){
int hcf=0;
for(int i=1;i<=n2;i++){
if(n1%i==0 && n2%i==0){
hcf=i;
}
}
printf("%d",hcf);
}
int main(){
int n1=12,n2=30;
gcd(n1,n2);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: