![]() |
[Cendol Inside] help me tugas C error di "MOD" ane kurang ngerti Quote:
#include int main() { short int jmlbungkus; short int jmlcoklat; short int coklatgratis; short int sisa; short int totalcokgratis; printf(" Masukan jumlah bungkus permen ? :"); scanf("%d",& jmlbungkus); do { } while (jmlcoklat>0 or jmlcoklat>1); coklatgratis= jmlbungkus / 2; sisa= jmlbungkus MOD 2 ; jmlbungkus=coklatgratis+sisa; totalcokgratis= coklatgratis+jmlcoklat; printf("%d",totalcokgratis); return 0; } yang di bold gan ... ane lupa lagi MOD itu gimana ??/ hehehehe pokoknya jmlbungkus dibagi terus 2 ? tadi ane ga konsen pas dosen nerangin http://static.kaskus.us/images/smilies/sumbangan/8.gif http://static.kaskus.us/images/smilies/sumbangan/8.gif help me gan melon inside </div> |
All times are GMT +7. The time now is 09:17 PM. |