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;
- cout<< " Ingrese el primer numero: "<<endl;
- cin>>n1;
- cout << "ingreso el segundo numero: "<< endl;
- cin>> n2;
- cout<<"--------------------"<<endl;
- if(n1>n2){
- for (i = n2; i <=n1; i ++){
- cout<<i<<endl;
- }
- }
- else
- for(i=n1; i<=n2; i++){
- cout<<i<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment