📜  如何在 C++ 中连续输入直到任何值.例如(接受输入直到给出 q) - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:48.256000             🧑  作者: Mango

代码示例1
summ = 0
count = 1
while raw_input("Enter q to quit or any other key to continue") != 'q':
    summ = summ+input()
    count=count+1
print summ/(count*1.0)