Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
HCF
#include<iostream> using namespace std; int main() { int lowest, number_1,number_2,i,hcf=1; cout<<"Enter Two Number for HCF👉🏻\n"; cin>>number_1>>number_2; if(number_1<number_2) { lowest=number_1; for(i=1;i<=lowest;i++) { if(number_1%i==0 and number_2%i==0) { hcf=i; } } cout<<"🤫👉🏻 "<<hcf<<endl; } if(number_1>number_2) { lowest=number_2; for(i=1;i<=number_2;i++) { if(number_1%i==0 and number_2%i==0) { hcf=i; } } cout<<"🤫👉🏻 "<<hcf<<endl; } if(number_1==number_2) { cout<<"🤓👉🏻 "<<number_1<<endl; } return 0; }
run
|
edit
|
history
|
help
1
diamond
volatile thread-safe object
newwork
palindrome
2015(M2)Mod.
TIME
1
Test1
multiply two numbers (previous)
const example