While loop: outputs the numbers between 1 and 10 : While « Language « C++
- C++
- Language
- While
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;
}
Related examples in the same category