Created
November 25, 2018 21:21
-
-
Save mephir/a3181435a259babfe3e7dce8a48d7013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int wczytaj_float(float * liczba); | |
void idioto_ochrona_dla_D1(float * liczba); | |
int main() { | |
float lic; | |
idioto_ochrona_dla_D1(&lic); | |
printf("Liczba: %f\n", lic); | |
return 0; | |
} | |
int wczytaj_float(float * liczba) { | |
float num; | |
printf("Podaj liczbe: "); | |
if (scanf("%f", &num) != 1) { | |
scanf("%*s"); | |
return 0; | |
} | |
*liczba = num; | |
return 1; | |
} | |
void idioto_ochrona_dla_D1(float * liczba) | |
{ | |
while (wczytaj_float(liczba) != 1) { | |
/* nie musimy tutaj nic robic ;) */ | |
printf("Zla liczba :)\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment