#include < iostream.h>
main ( ) {
int counter =1; //initialise a counter that will start at 1
int input;
// input
cout << "Enter an integer : ";
cin >> input;
// do this while your counter is less than 13 (stop at 12)
while (counter < 13) {
// display input, a string "x" , your counter, then multiply the amswer
cout ,< input << "x" ,< counter << "="<< input * counter << endl;
// increment your counter same as (counter=counter + 1) counter ++;
}
return O;
}
No comments:
Post a Comment