-
-
Save programmingfaster0226/fb8d49dc4fbc9434b6b624b2787117fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Program to input two integer numbers and display the sum of even numbers between these two input numbers*/ | |
#include<stdio.h> | |
#include<conio.h> | |
void main() | |
{ | |
int a,b,x,y,t,hcf,lcm; | |
printf("enter two integer \n"); | |
scanf("%d%d",&x,&y); | |
a=x; | |
b=y; | |
while (b!=0) | |
{ t=b; | |
b=a%b; | |
a=t; | |
} | |
hcf=a; | |
lcm=(x*y)/hcf; | |
printf("GCD=%d,and LCM=%d",hcf,lcm); | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment