#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
int x,y,z,q;
cout<<"menukar bilangan"<<endl;
cout<<"x= ";cin>>x;
cout<<"y= ";cin>>y;
cout<<"z= ";cin>>z;
q=x;
x=y;
y=z;
z=q;
cout<<"setelah ditukar\n";
cout<<"x ="<<x<<endl;
cout<<"y ="<<y<<endl;
cout<<"z ="<<z;
return 0;
}
Hasil output
0 komentar:
Posting Komentar