Program Tukar 3 Bilangan dengan DEV C++
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
int A=5, B=2, C=3, D;
cout<<"A = "<<endl;cin>>A;
cout<<"B = "<<endl;cin>>B;
cout<<"C = "<<endl;cin>>C;
D=A;
A=B;
B=C;
C=D;
cout<<endl;
cout<<"A = "<<A<<endl;
cout<<"B = "<<B<<endl;
cout<<"C = "<<C<<endl;
return 0;
}
Program Tukar 3 Bilangan dengan Pascal
Tidak ada komentar:
Posting Komentar