saban123

program tukar variabel

Dec 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream.h>
  2. #include <stdlib.h>
  3. main(){
  4. int a,b,c,d,e,x;
  5. cout<<"a = ";cin>>a;
  6. cout<<"b = ";cin>>b;
  7. cout<<"c = ";cin>>c;
  8. cout<<"d = ";cin>>d;
  9. cout<<"e = ";cin>>e;
  10. x=a;
  11. a=b;
  12. b=c;
  13. c=d;
  14. d=e;
  15. e=x;
  16. cout<<"========================"<<endl;
  17. cout<<"a = "<<a<<endl;
  18. cout<<"b = "<<b<<endl;
  19. cout<<"c = "<<c<<endl;
  20. cout<<"d = "<<d<<endl;
  21. cout<<"e = "<<e<<endl;
  22. system("pause");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment