Aktualizovat "program.c

This commit is contained in:
Daniel Béreš 2019-11-10 15:20:30 +00:00
parent 002ba02abb
commit 51c7b2684c

View File

@ -5,7 +5,7 @@
long long int nsd(long long int,long long int);
long long int nsd(long long int cislo1,long long int cislo2){
while (cislo1 != cislo2){
/*while (cislo1 != cislo2){
if (cislo1 > cislo2){
cislo1 -= cislo2;
} else{
@ -13,9 +13,13 @@ long long int nsd(long long int cislo1,long long int cislo2){
}
}
return cislo1;
*/
if (cislo1 == 0)
return cislo2;
return nsd(cislo2 % cislo1, cislo1);
}
int main() {
//freopen("vstup.txt","r",stdin);
freopen("vstup.txt","r",stdin);
char* prvy_vstup = malloc(100* sizeof(char));
char* druhy_vstup = malloc(100* sizeof(char));
long long int prve_cislo;