Answers for "how to take continuous input in c++ until any value. Like for example(taking input until giving q)"

C++
0

how to take continuous input in c++ until any value. Like for example(taking input until giving q)

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)
Posted by: Guest on November-12-2020

Code answers related to "how to take continuous input in c++ until any value. Like for example(taking input until giving q)"

Browse Popular Code Answers by Language