Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using namespace std;
- int main()
- {
- int a;
- cout<<"A="; cin>>a;
- int b;
- cout<<"B="; cin>>b;
- for (int i=a; i<=b; i++)
- if (i%2==0) cout<<i<<"\t\n";
- cout<<"K sledyuschemy\n";
- getch();
- ////////////////////////////////////
- /// ///
- ///------------------------------///
- /// ///
- ////////////////////////////////////
- int q;
- cout<<"A="; cin>>q;
- int w;
- cout<<"B="; cin>>w;
- int i=q;
- while (i<=w)
- {
- if (i%2==0) cout<<i<<"\t\n";
- i++;
- }
- cout<<"K sledyuschemy\n";
- getch();
- ////////////////////////////////////
- /// ///
- ///------------------------------///
- /// ///
- ////////////////////////////////////
- int r;
- cout<<"A="; cin>>r;
- int t;
- cout<<"B="; cin>>t;
- int p=r;
- do
- {
- if (p%2==0) cout<<p<<"\t\n";
- p++;
- }
- while (p<=t);
- cout<<"K sledyuschemy\n";
- getch();
- return 0;
- }
Add Comment
Please, Sign In to add comment