Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int x, max;
- printf("Podaj liczbe x:");
- scanf("%d", &x);
- if(x != -1) {
- max = x;
- while( x != -1) {
- printf("Podaj liczbe x:");
- scanf("%d", &x);
- if (x> max && x!= -1)
- {
- max = x;
- }
- }
- printf("Max: %d\n", max);
- }
- else printf("Blad");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement