vieoldiaorstabAvatar border
TS
vieoldiaorstab
c++ : tolongin ane bitwise operator gan...
ane baru belajar c++ gan pke ebook... nah ad soal kaya gini :

Write a program that reads an integer value from the keyboard into a variable of type int , and uses one of the bitwise operators (i.e. not the % operator!) to determine the positive remainder when divided by 8. For example, 29 = (3x8)+5 and 14 = ( 2x8)+2 have positive remainder 5 and 2, respectively, when divided by 8.

ane dah dpt jawabannya dari hasil ane nyari di google :
Spoiler for code:


nah tapi ane masih bingung. kok bisa tw klo hrus di &7?? masa harus dicoba satu satu angkanya? ato ad caranya biar gampang nemuinnya? ane bingung gan...(maaf klo pertanyaan ane konyol gan, baru belajar bgt) emoticon-Sorry
0
681
1
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Mari bergabung, dapatkan informasi dan teman baru!
Programmer Forum
Programmer ForumKASKUS Official
20.2KThread4.3KAnggota
Terlama
GuestAvatar border
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Ikuti KASKUS di
© 2023 KASKUS, PT Darta Media Indonesia. All rights reserved.