| The while loop in the context of a full C++ program. | Lecture 3 - slide 18 : 36 Program 1 |
#include <iostream>
#include <string>
using namespace std;
int main(){
int i;
while (cin >> i) // convert istream to bool or int
cout << i*2 << " " << endl;
cout << "DONE";
}