Aktualizovat "program.c

This commit is contained in:
Daniel Béreš 2019-10-29 13:24:52 +00:00
parent 912b504b8b
commit da65046510

View File

@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
int main() {
char* prve_cislo = malloc(100* sizeof(char));
char* druhe_cislo = malloc(100* sizeof(char));
@ -13,10 +13,10 @@ int main() {
return 0;
}
int cislo1 = strtof(prve_cislo,NULL);
int cislo1 = strtof(strtok(prve_cislo,"\n"),NULL);
int cislo2;
while((fgets(druhe_cislo,100,stdin))){
cislo2= strtof(druhe_cislo,NULL);
cislo2= strtof(strtok(druhe_cislo,"\n"),NULL);
while (cislo1 != cislo2){
if (cislo1 > cislo2){
cislo1 -= cislo2;