SHARE
TWEET

Untitled

a guest Sep 16th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top