Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- int n1, n2, n3, n4, n5, cont=0;
- printf ("Entre com 5 numeros:");
- scanf ("%d %d %d %d %d", &n1, &n2, &n3, &n4, &n5);
- if (n1<0)
- cont = cont+1;
- if (n2<0)
- cont = cont+1;
- if (n3<0)
- cont = cont+1;
- if (n4<0)
- cont = cont+1;
- if (n5<0)
- cont = cont+1;
- printf ("O numero de numeros negativos e: %d", cont);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment