從語言實現喝汽水,1瓶汽水1元,2個空瓶能夠換一瓶汽水,給20元,能夠多少汽水。

題目 喝汽水,1瓶汽水1元,2個空瓶能夠換一瓶汽水,給20元,能夠多少汽水。編程實現。 web 分析 方法一 循環實現 代碼以下 #include<stdio.h> #include<stdlib.h> int main() { int total = 20; //汽水總數 int kps = 0; //空瓶數 int sy = 0 ; //剩餘空瓶
相關文章
相關標籤/搜索