Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void positiveCheck(int *number){
- if(*number > 0){
- cout << "Positive";
- }
- else if (*number < 0){
- cout << "Negative";
- }
- else{
- cout << "Zero";
- }
- }
- int main()
- {
- int num = 2;
- positiveCheck(&num);
- cout << endl;
- num = 0;
- positiveCheck(&num);
- cout << endl;
- num = -2;
- positiveCheck(&num);
- cout << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement