#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 a,b,c,d;
cout<<">>>>>>>>>pertukaran nilai bilangan<<<<<<<<< \n";
cout<<"\tnilai a =";
cin>>a;
cout<<"\tnilai b =";
cin>>b;
cout<<"\tnilai c =";
cin>>c;
d=a;
a=b;
b=c;
c=d;
cout<<"hasil:"<<"\na="<<a<<"\nb="<<b<<"\nc="<<c;
return 0;
}
hasil dari program tersebut :
Selasa, 30 Juni 2015
Home »
» program tukar nilai bilangan
program tukar nilai bilangan
10.38
No comments
Related Posts:
program tukar nilai bilangan #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 a,b,c,d; &nb… Read More
Kriptografi Kriptografi (cryptography) berasal dari bahasa Yunani, terdiri dari dua suku kata yaitu kripto dan graphia. Kripto artinya menyembunyikan, sedangkan graphia artinya tulisan. Kriptografi adalah ilmu yang mempelajari tek… Read More
program menghitung jumlah pecahan#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[]) { float p1,p2,a1,b1,a2,b2;&nb… Read More
program mencari titik tengah#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[]) { double a,b,c; &n… Read More
test bilangan prima#include <cstdlib> #include <iostream> #include <math.h> using namespace std; class Prima{ public: bool prima(int x); private: int k, y; bool test; }; bool Prima::prima(int x){ if(x<2){ … Read More
0 komentar:
Posting Komentar