bai2 he nhi phan thap phan
function bai2
a= input('Nhap a:');
b= input('Nhap b:');
c= input('Nhap c:');
d= input('Nhap d:');
e= input('Nhap e:');
n= input('Nhap he co so bat ky ma ban muon chuyen doi:');
a1=dec2bin(a);
a2=dec2hex(a);
a3=dec2base(a,n);
disp(['Voi:',num2str(a),'- He nhi phan:',a1,' -He thap luc phan:',a2,' - He',num2str(n),':',a3])
b1=dec2bin(b);
b2=dec2hex(b);
b3=dec2base(b,n);
disp(['Voi:',num2str(b),'- He nhi phan:',b1,' -He thap luc phan:',b2,' - He',num2str(n),':',b3])
c1=dec2bin(c);
c2=dec2hex(c);
c3=dec2base(c,n);
disp(['Voi:',num2str(c),'- He nhi phan:',c1,' -He thap luc phan:',c2,' - He',num2str(n),':',c3])
d1=dec2bin(d);
d2=dec2hex(d);
d3=dec2base(d,n);
disp(['Voi:',num2str(d),'- He nhi phan:',d1,' -He thap luc phan:',d2,' - He',num2str(n),':',d3])
e1=dec2bin(e);
e2=dec2hex(e);
e3=dec2base(e,n);
disp(['Voi:',num2str(e),'- He nhi phan:',e1,' -He thap luc phan:',e2,' - He',num2str(n),':',e3])
Bạn đang đọc truyện trên: Truyen247.Pro