Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <locale.h>
  3.  
  4. void main() {
  5. setlocale(LC_CTYPE, "Russian");
  6. int a, b, c;
  7. printf("Введите три целых числа: ");
  8. scanf_s("%d%d%d", &a, &b, &c);
  9. int pol = 0, otr = 0;
  10. if (a > 0) pol++;
  11. else {
  12. if (a != 0) otr++;
  13. }
  14. if (b > 0) pol++;
  15. else {
  16. if (b != 0) otr++;
  17. }
  18. if (c > 0) pol++;
  19. else {
  20. if (c != 0) otr++;
  21. }
  22. //printf("Кол-во положительных:", pol, " Кол-во отрицательных:", otr);
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement