Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int i;
  5.     float cena = 1, do_zaplaty = 0;
  6.     while (cena >= 0) {
  7.         scanf("%f",&cena);
  8.         if(cena > 0) {
  9.         do_zaplaty = do_zaplaty + cena;}
  10.     }
  11.    
  12.     printf("%.2f", do_zaplaty);
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement