Generation

generate functionTue, 11 Apr 2023

realizar un programa que pida un numero y diga si es positivo o negativo

#include <iostream> using namespace std; int main() { int a; cout<<"Enter a number: "; cin>>a; if(a >= 0) { cout<<a<<" is a positive number\n"; } else { cout<<a<<" is a negative number\n"; } }

Questions about programming?Chat with your personal AI assistant