MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / main

Function main

Lab_02/03_negative_positive.cpp:7–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace std;
6
7int main() {
8 float number;
9
10 cout << "Enter a number: ";
11 cin >> number;
12
13 if (number > 0) {
14 cout << "The number is positive." << endl;
15 } else if (number < 0) {
16 cout << "The number is negative." << endl;
17 } else {
18 cout << "The number is zero." << endl;
19 }
20
21 system("pause");
22 return 0;
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected