Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- main(){
- int cont=0;
- float x,y=0,z,m=0;
- printf ("Digite o primeiro numero");
- scanf ("%f",&x);
- z=x;
- m=x;
- do {
- printf("Digite outro numero");
- scanf("%f",&x);
- if (x>=z)
- z=x;
- if (x<=m)
- m=x;
- cont=cont+1;
- } while(cont<149);
- printf("O maior valor e: %.2f\n",z);
- printf("O menor valor e: %.2f",m);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement