Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. #include <math.h>
  4.  
  5. #include <conion.h>
  6.  
  7. main()
  8.  
  9. {int p=0;
  10.  
  11. int n=0;
  12.  
  13. int a;
  14.  
  15. int k;
  16.  
  17. int s;
  18.  
  19. printf(“vvedite chislo- skolko budet chisel v posledovatelnosti”);
  20.  
  21. scanf(%d”,&p);
  22.  
  23. while(n<p)
  24.  
  25. {printf(“vvedite posledovatelnost сhisel”);
  26.  
  27. scanf(%d”,&a);
  28.  
  29. if(a>=0)
  30.  
  31. {k++;}
  32.  
  33. else
  34.  
  35. {s++;}
  36.  
  37. n++;};
  38.  
  39. printf(“kolichestvo pologitelnih chisel=%d summa otricatelnih=%d”,k,s);
  40.  
  41. getch ();
  42.  
  43. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement