Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int counter = 0;
- float a,b,c,d,e;
- printf("Entre com cinco valores :\n"); scanf("%f %f %f %f %f",&a,&b,&c,&d,&e);
- if (a<0) counter++;
- if (b<0) counter++;
- if (c<0) counter++;
- if (d<0) counter++;
- if (e<0) counter++;
- printf("Dos valores inseridos, %d sao negativos!\n",counter);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment