Advertisement
Kolyach

4.2

Nov 11th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. void sign();
  8.  
  9. int main() {
  10.     setlocale(LC_ALL, "russian");
  11.     sign();
  12. }
  13.  
  14. void sign() {
  15.     float a;
  16.     cin >> a;
  17.     if (a > 0) cout << "Знак +\n";
  18.     if (a == 0) cout << "Число равно 0\n";
  19.     if (a < 0) cout << "Знак -\n";
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement