Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RyanHakurei/aad2f0bc07ba3b3d49e4174bbcdd8a59 to your computer and use it in GitHub Desktop.
Save RyanHakurei/aad2f0bc07ba3b3d49e4174bbcdd8a59 to your computer and use it in GitHub Desktop.
// Program to check whether an integer is positive or negative
// This program considers 0 as positive number
#include <iostream>
using namespace std;
int main()
{
//Declare your variable with a meaningful name
int ?????;
//cout<< Output to the user goes here
//cin>> Input goes here
//if statement should have code and output to user
if ( ???????)
{
cout << ???????? endl;
}
//else should have code that “if” didn’t handle and output to user
else
{
cout << ????????endl;
}
//keep this how it is…do not change anything after this
cout << "This line is always printed.";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment