Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void){
- int s1;
- int s2;
- printf("szam1 szam2: ");
- scanf("%d %d", &s1, &s2);
- printf("lnko(%d, %d)=%d", s1, s2, lnko(s1, s2));
- return 0;
- }
- int lnko(int a, int b){
- int temp;
- while(b>0){
- temp = b;
- b = a%b;
- a = temp;
- }
- return a;
- }
Advertisement
Add Comment
Please, Sign In to add comment