Battle: Dar es Salaam vs Nairobi

Battle: Dar es Salaam vs Nairobi

Hujui wewe eti
Sum += i++;
Unadhani programming ni sawa na kupiga propaganda kwenye mitandao.
Hahahahahaha!!!
Wewe think you not after the truth you just after umaarufu mtandaoni.... this mistakes happen if you know proggraming and from how you written it you have an idea am sure deep down you know the workable way ni vile I have shown you.... it's a thing I use on a daily basis
 
Naona unatafuta usaidizi wa Thika road, ipumzishe kdg mana imechoka sn hiyo road, kwnz naanza Road zenye taa kwnz alafu nakuja highways[emoji116][emoji116][emoji3][emoji3][emoji117][emoji117][emoji90][emoji90]
tapatalk_1596905380933.jpg
tapatalk_1601658262227.jpg
tapatalk_1603565855272.jpg
 
Simba 254 leo umenichekesha sana.
Let me tell you.
1. In order to reach 1000 the loop must increment i.
2. The while loop check the condition first then executes the statement
3. do while loop executes the statement the checks the condition.

Check codes zako kama zina increment.
 
Wewe think you not after the truth you just after umaarufu mtandaoni.... this mistakes happen if you know proggraming and from how you written it you have an idea am sure deep down you know the workable way ni vile I have shown you.... it's a thing I use on a daily basis
Mistakes!!!? Are you serious. Yaani small code na Umeuliza swali mwenyewe uandike mistakes.
Hahahahahahahaha!!! Bado sana.
 
Wewe think you not after the truth you just after umaarufu mtandaoni.... this mistakes happen if you know proggraming and from how you written it you have an idea am sure deep down you know the workable way ni vile I have shown you.... it's a thing I use on a daily basis
Let us shorten the answer.
Tell me the output
Code:
int i = 0;
long sum = 0;
sum += i++;
Console.write(sum);
 
Let us shorten the answer.
Tell me the output
Code:
int i = 0;
long sum = 0;
sum += i++;
Console.write(sum);


Mpuuzi huyu Mkenya.

Ungeachana nae.

Aina ya uandishi wake tu, inaonesha ni mtu anajifunza. Aina ya uandishi wake kama ni program ya mistari kazaa na ikafail ku execute siujui anaanzaje.

Mpotezee huyu Mumbi.
 
Wewe ndo umefanya mistake si mimi
Mistake kwanini usiseme hiyo mistake.
Mimi nimekueleza kosa lako ni nini.
According to your question in a for loop.
The first round of the loop sum = 0
But if you write sum += i++
That means sum = sum + (0+1) which equals to 1.

I told you jaribu kuandika code zako. Jibu litakuwa tofauti.
And your loop will not end.
 
Ebu fanya ya " do while " labda hiyo unaeza pata
Sasa kosa liko wapi? Tena mwenzako kajiongeza zaidi kakuwekea clean code kama inavyotakiwa kitaalamu. Yaani..
Code:
 sum  +=  i;
Badala ya hii yako inayokula resources.
Code:
 sum = sum + i
Hivi wewe unajua hata tofauti ya hizo code mbili kwenye efficiency?
 
Back
Top Bottom