Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- float VT,MT,CM,CV,P,Racun,udioV,udioM;
- printf("Unesite potrosnju elektricne energije:");
- scanf("%f %f ",&VT,&MT);
- printf("Unesite cijene male i velike tarife:");
- scanf("%f %f ",&CM,&CV);
- P=VT+MT;
- Racun=VT*CV+MT*CM;
- udioV=VT/P*100;
- udioM=MT/P*100;
- printf("\nUkupna potrosnja je: %.2f kWh",P);
- printf("\nUdio velike tarife u ukupnoj potrosnji je:%.2f ",udioV);
- printf("\nUdio male tarife u ukupnoj potrosnji je: %.2f ",udioM);
- printf("\nIznos racuna je:%.2f KM\n",Racun);
- return 0 ;
- }
Add Comment
Please, Sign In to add comment