Guest User

Untitled

a guest
Dec 11th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include <stdio.h>
  2. int main ()
  3. {
  4. float VT,MT,CM,CV,P,Racun,udioV,udioM;
  5. printf("Unesite potrosnju elektricne energije:");
  6. scanf("%f %f ",&VT,&MT);
  7. printf("Unesite cijene male i velike tarife:");
  8. scanf("%f %f ",&CM,&CV);
  9. P=VT+MT;
  10. Racun=VT*CV+MT*CM;
  11. udioV=VT/P*100;
  12. udioM=MT/P*100;
  13. printf("\nUkupna potrosnja je: %.2f kWh",P);
  14. printf("\nUdio velike tarife u ukupnoj potrosnji je:%.2f ",udioV);
  15. printf("\nUdio male tarife u ukupnoj potrosnji je: %.2f ",udioM);
  16. printf("\nIznos racuna je:%.2f KM\n",Racun);
  17. return 0 ;
  18. }
Add Comment
Please, Sign In to add comment