Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(void){
- int i,n1,n2,pos=0;
- cout<< " Ingrese la cantidad de numeros a listar: "<<endl;
- cin>>n1;
- cout<<"--------------------"<<endl;
- cout << "Ingrese el listado de los: "<<n1<< " numeros que eligio" <<endl;
- for (i = 0; i < n1; i++){
- cin>> n2;
- if(n2>0)
- pos++;
- }
- cout<<"--------------------"<<endl;
- cout << "La cantidad de numeros positivos son: "<<pos<< endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement