Reginaldojs

exercicio 44,lista 3

Jun 15th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main(){
  4.     int i=0,n,neg=0;
  5.     printf("digite varios valores:\n");
  6.     while(i<=n){
  7.                       scanf("%d",&n);
  8.                       if(n<0)
  9.                       neg++;
  10.                     }
  11.     printf("%d eh negativo\n",n);
  12.     printf("temos %d numero(s) negativo(s)\n",neg);  
  13.     system ("pause");
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment