Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Program: pnz.cc
- // Author: Yoan Pinzon
- // Date: Agosto 30, 2006
- #include <iostream>
- using namespace std;
- int main()
- {
- int x;
- cout << "Positivo, Negativo o Zero" << endl;
- cout << "=========================" << endl;
- cout << "Entre un numero = "; cin >> x;
- if( x > 0 )
- {
- cout << "El numero " << x << " es positivo" << endl;
- }
- else
- {
- if( x < 0 )
- {
- cout << "El numero " << x << " es negativo" << endl;
- }
- else
- {
- cout << "El numero " << x << " es zero" << endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement