Search
 
SCRIPT & CODE EXAMPLE
 

CPP

positive negative c++

#include<iostream>
using namespace std;

int main()		{
	
	int x;
	cout << "Enter a number:";
	cin >> x;
		if (x<0)
			{
				cout <<x<<" is a negative number.";
			}
				else if (x>0)
			{
				cout <<x<< " is a positive number.";
			}
	return 0;
				}
Comment

PREVIOUS NEXT
Code Example
Cpp :: hello command not printing in c++ 
Cpp :: compile c++ MPI Program 
Cpp :: int a=0; int b=30; 
Cpp :: print all chrchetrs of a string c++ 
Cpp :: cuda atomic swap 
Cpp :: c++ ascii value 
Cpp :: scope resolution operator in c++ 
Cpp :: pointers in c++ 
Cpp :: strip whitespace c++ 
Cpp :: binpow in fenwick tree 
Cpp :: function template in c++ 
Cpp :: cpp tutorial 
Cpp :: in c++ 
Cpp :: imgui menu bar 
Cpp :: char * to string c++ 
Cpp :: Dfs program in c++ 
C :: how to slow voice speed in pyttsx3 
C :: plt hide axis ticks 
C :: vscode arduino [Warning] Output path is not specified. Unable to reuse previously compiled files. Upload could be slow. See README. 
C :: golden cobblestone modpack 
C :: simplify fractions C 
C :: C program to count number of digits in a number 
C :: execute maven project in cmd 
C :: linear search program in c 
C :: divide and conquer program in c 
C :: right side of div 
C :: how to represent unsigned char with % c 
C :: how to reverse a string in c 
C :: stack push code 
C :: ** in c 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =