Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. program nisko;
  2. #include("stdlib.hhf");
  3.  
  4. static
  5. liczba1: int32;
  6. liczba2: int32;
  7.  
  8. begin nisko;
  9.  
  10. stdout.put("Podaj liczbe, ktora bedzie dzielona przez druga liczbe",nl);
  11. stdin.get(liczba1);
  12. stdout.put("Podaj liczbe, przez ktora bedziesz dzielic pierwsza liczbe",nl);
  13. stdin.get(liczba2);
  14.  
  15. while(liczba2==0) do
  16. stdout.put("Nie mozna dzielic przez 0! Podaj liczbe rozna od 0",nl);
  17. stdin.get(liczba2);
  18. endwhile;
  19.  
  20. mov(0,eax);
  21. mov(liczba1,eax);
  22.  
  23. cdq();
  24.  
  25. idiv(liczba2,edx:eax);
  26.  
  27. stdout.put("Wynik dzielenia to: ",nl);
  28. stdout.puti32(eax);
  29. stdout.newln();
  30.  
  31. stdout.put("Z reszta: ",nl);
  32. stdout.puti32(edx);
  33. stdout.newln();
  34.  
  35. end nisko;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement