While loop: outputs the numbers between 1 and 10
#include <iostream> using namespace std; int main(void) { int num = 1; while (num <= 10) { cout << num << " "; num++; } return 0; }