Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(void){
- int i,n;
- cout<< " Ingrese un numero positivo"<<endl;
- cin>>n;
- cout<<"--------------------"<<endl;
- if(n<1) {
- cout << "ingreso un numero no positivo, ingrese un numero positivo: "<< endl;
- cin>> n;
- cout<<"--------------------"<<endl;
- }
- for (i = 1; i <=n; i ++){
- cout<<i<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment