write an application to print out the numbers 10 through 49 in the following manner
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39
40 41 42 43 44 45 46 47 48 49
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main(void){
cout<<"10 ";
for(int i=11;i<50;i++){
if(i%10==0){
cout<<"\n";
}
cout<<i<<" ";
}
cout<<"\n\n";
system("pause");
return 0;
}
Comments
Leave a comment