#include <iostream> using namespace std; int main() { float i = 1; do { cout<<i<<"\n"; i = i + 0.1; } while (i <= 2.1); return 0; }
codeaft@codeaft:~$ g++ codeaft.cppcodeaft@codeaft:~$ ./a.out 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2 codeaft@codeaft:~$