Guest User

Untitled

a guest
Feb 18th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.04 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a;
  7.     cout<<"A="; cin>>a;
  8.     int b;     
  9.     cout<<"B="; cin>>b;
  10.     for (int i=a; i<=b; i++)
  11.         if (i%2==0) cout<<i<<"\t\n";
  12.     cout<<"K sledyuschemy\n";
  13.     getch();
  14. ////////////////////////////////////
  15. ///                              ///
  16. ///------------------------------///
  17. ///                              ///
  18. ////////////////////////////////////
  19.     int q;
  20.     cout<<"A="; cin>>q;
  21.     int w;     
  22.     cout<<"B="; cin>>w;
  23.     int i=q;
  24.     while (i<=w)
  25.     {
  26.           if (i%2==0) cout<<i<<"\t\n";
  27.           i++;
  28.         }
  29. cout<<"K sledyuschemy\n";
  30. getch();
  31. ////////////////////////////////////
  32. ///                              ///
  33. ///------------------------------///
  34. ///                              ///
  35. ////////////////////////////////////
  36.     int r;
  37.     cout<<"A="; cin>>r;
  38.     int t;     
  39.     cout<<"B="; cin>>t;
  40.     int p=r;
  41.     do
  42.     {
  43.           if (p%2==0) cout<<p<<"\t\n";
  44.           p++;
  45.         }
  46.         while (p<=t);
  47.         cout<<"K sledyuschemy\n";
  48.         getch();
  49.  
  50. return 0;
  51. }
Add Comment
Please, Sign In to add comment