Assignments » Flow Of Control » Set2 » Solution 1
Write a program to print number from 1 to 10.
Sourec Code
#include<iostream> using namespace std; int main() { int i=1; while(i<=10) { cout<<i<<"\n"; i++; } return 0; }
Output
1 2 3 4 5 6 7 8 9 10