Im big noob about this, can somebody say if this is typing number in while loop correct, if not can you correct it? (never got teached about DevC++ soo i don't Know a thing).
As a school homework that we never did.The question was that We have to type numbers from 1 to 5 using while loop.
#include <iostream>
using namespace std;
int main () {
int a = 1;
do {
cout<< a << endl;
a = a + 1;
} while( a < 6 );
return 0;
}
As a school homework that we never did.The question was that We have to type numbers from 1 to 5 using while loop.
#include <iostream>
using namespace std;
int main () {
int a = 1;
do {
cout<< a << endl;
a = a + 1;
} while( a < 6 );
return 0;
}