f117e
Newbie level 1
Can giup ve PIC18Fxx2
Toi chi moi hoc ve PIC18FXX2 nen chua co kinh nghiem nhieu ve hop ngu. Xin vui long giup toi doan code nay, vi toi dang can gap:
Viet PIC18 cho doan ma sau.
i = 1
j = 0
k = -1
while (i > j) {
i = i + a – 2 * j;
if (j >= k) {
i = i + 2;
k = k – b + 2 * j;
}
j++;
}
Su dung gia tri a va b 0x08 , 0x0f.Tim gia tri cuoi cung cua i, j, va k cho nhung cap a va b co quan he a > b, a < b, va a = b.
Xin cam on truoc!
Toi chi moi hoc ve PIC18FXX2 nen chua co kinh nghiem nhieu ve hop ngu. Xin vui long giup toi doan code nay, vi toi dang can gap:
Viet PIC18 cho doan ma sau.
i = 1
j = 0
k = -1
while (i > j) {
i = i + a – 2 * j;
if (j >= k) {
i = i + 2;
k = k – b + 2 * j;
}
j++;
}
Su dung gia tri a va b 0x08 , 0x0f.Tim gia tri cuoi cung cua i, j, va k cho nhung cap a va b co quan he a > b, a < b, va a = b.
Xin cam on truoc!