Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program nisko;
- #include("stdlib.hhf");
- static
- liczba1: int32;
- liczba2: int32;
- begin nisko;
- stdout.put("Podaj liczbe, ktora bedzie dzielona przez druga liczbe",nl);
- stdin.get(liczba1);
- stdout.put("Podaj liczbe, przez ktora bedziesz dzielic pierwsza liczbe",nl);
- stdin.get(liczba2);
- while(liczba2==0) do
- stdout.put("Nie mozna dzielic przez 0! Podaj liczbe rozna od 0",nl);
- stdin.get(liczba2);
- endwhile;
- mov(0,eax);
- mov(liczba1,eax);
- cdq();
- idiv(liczba2,edx:eax);
- stdout.put("Wynik dzielenia to: ",nl);
- stdout.puti32(eax);
- stdout.newln();
- stdout.put("Z reszta: ",nl);
- stdout.puti32(edx);
- stdout.newln();
- end nisko;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement