Guest User

Untitled

a guest
Feb 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. float D,V,Dp=0.225,Sp=0.165,Z,P,A,C=39.63,U=12.44,L,Popust,Cijena,Lipe;
  7. int BrojPlocica,Kune;
  8.  
  9. printf ("Unesite duljinu zida:");
  10. scanf ("%f", &D);
  11. printf ("Unesite visinu zida:");
  12. scanf ("%f", &V);
  13. if (V<1.30 || V>2.05)
  14. V=1.75;
  15. Z=D/Dp;
  16. P=V/Sp;
  17. A=(Z*P);
  18. BrojPlocica = A+1;
  19. printf ("Broj plocica je: %d\n", BrojPlocica);
  20. if (BrojPlocica>100)
  21. {
  22. L=BrojPlocica - 100;
  23. Popust=((L*C)*16)/100;
  24. }
  25. else Popust=0;
  26. Cijena = (BrojPlocica*C)-Popust;
  27. printf ("Cijena je: %.2fkn ", Cijena);
  28. Kune = Cijena;
  29. Lipe = (Cijena - Kune)*100;
  30. printf ("= %d kuna i %.0f lipa", Kune, Lipe);
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39. }
Add Comment
Please, Sign In to add comment