Advertisement
noor017

Positive Numbers

Jun 7th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     double n;
  6.     int i, c = 0;
  7.  
  8.     for (i=1; i<=6; i++)
  9.     {
  10.         scanf("%lf", &n);
  11.     }
  12.  
  13.      if (n > 0)
  14.      c++;
  15.      
  16.      printf("%d valores positivos\n", c);
  17.  
  18.      return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement