Search
 
SCRIPT & CODE EXAMPLE
 

CPP

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)
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ How can I make a std::vector of function pointers 
Cpp :: c++ unordered set count 
Cpp :: c++ asio read full socket data into buffer 
Cpp :: c++ void pointer 
Cpp :: store binary data in buffer 
Cpp :: MPI_Sendrecv 
Cpp :: private static c++ 
Cpp :: How to write string in lpcstr in c++ 
Cpp :: ‘npos’ is not a member of ‘std’ 
Cpp :: printing sub arrays 
Cpp :: C++ How to insert and print array elements? 
Cpp :: how to find total numbe of distinct characters in a string in c 
Cpp :: add comment in c/c++ 
Cpp :: c++ switch integer 
Cpp :: string class cpp 
Cpp :: convert c++ program to c online 
Cpp :: permutation and combination program in c++ 
Cpp :: C++ bool 
Cpp :: dualSort 
Cpp :: declare a structer in cpp 
Cpp :: how to initialize a vector in c++ 
Cpp :: c++ sudoku solver 
Cpp :: how to create a structure c++ 
Cpp :: C++ Assignment Operators 
Cpp :: print all even number using for loop c++ 
Cpp :: c++ excel cell blank cells 
C :: how to get time and date in c 
C :: arma 3 get group size 
C :: rl_replace_line 
C :: addition of two matrix in c 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =