+ 2

problem in converting decimal to hexadecimal

while(dec3>0) {R=dec3%16; if(R>9) { switch (R) { case 10: cout << "A"; break; case 11: cout << "B"; break; case 12: cout << "C"; break; case 13: cout << "D"; break; case 14: cout << "E"; break; case 15: cout << "F"; break;}} else { cout<<R;} R/16;} but not correct output

14th May 2017, 7:00 AM
bushra naz
bushra naz - avatar
2 Antworten
14th May 2017, 10:43 AM
Volker Milbrandt
Volker Milbrandt - avatar