Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. //***************************************************************************************** glupie ******************
  2. void wczyt_vat(float* tablica, int ile)
  3. {
  4.     int i = 0;
  5.     float stawka;  
  6.    
  7.     while (i < ile)
  8.     {
  9.         int czy_wykonac = 1;
  10.  
  11.         while (czy_wykonac == 1)
  12.         {
  13.             printf("Podaj poprawna stawke vat dla produktu o indeksie %d: ", i);
  14.             scanf_s("%f", &stawka);
  15.  
  16.             if (stawka == 0.0 || stawka == 5.0 || stawka == 8.0 || stawka == 23.0)
  17.             {
  18.                 *(tablica++) = stawka;
  19.                 czy_wykonac = 0;
  20.             }              
  21.         }
  22.         i++;       
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement