Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int a,b,x,gcd,quite;
- printf("Developed by: Nisad\nGcd:\n\n");
- scanf("%d %d",&a,&b);
- if(a<b){
- x=a;
- }
- else{
- x=b;
- }
- for(;x>=1;x--){
- if(a % x == 0 && b % x == 0){
- gcd=x;
- break;
- }
- }
- printf("Gcd is: %d",gcd);
- scanf("%d",&quite);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement