Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int a,b,i;
- int main()
- {
- do
- {
- cout<<"a= ";cin>>a;
- cout<<"b= ";cin>>b;
- if(a%2==1)
- a++;
- for(i=a; i<=b; i=i+2)
- {
- cout<<i<<" ";
- }
- cout<<endl;
- }while(a<=b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement