50.contoh manipulator dec, oct, hex dengan DEV C++
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
int nilai = 500;
cout<<"Nilai Awal= "<<nilai<<endl<<endl;
cout<<"Nilai ke Desimal = "<<dec<<nilai<<endl;
cout<<"Nilai ke Oktal = "<<oct<<nilai<<endl;
cout<<"Nilai ke Hexadesimal = "<<hex<<nilai<<endl;
return 0;
}
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
int nilai = 500;
cout<<"Nilai Awal= "<<nilai<<endl<<endl;
cout<<"Nilai ke Desimal = "<<dec<<nilai<<endl;
cout<<"Nilai ke Oktal = "<<oct<<nilai<<endl;
cout<<"Nilai ke Hexadesimal = "<<hex<<nilai<<endl;
return 0;
}
Komentar
Posting Komentar