Answer to Question #24286 in C++ for gaurav chauhan
2013-02-12T07:11:33-05:00
how can i print a multiplication table of 7
1
2013-02-13T09:39:29-0500
#include <conio.h> #include <iomanip> #include <iostream> using namespace std; /* Prints the row separator */ void print_separator() { for (int n = 0; n < 59; n++) cout << "-"; cout << endl; } void main() { /* Print the table header */ cout << " |"; for (int n = 0; n <= 10; n++) cout << setw(3) << n << " |"; cout << endl; print_separator(); /* Print the table body */ cout << " 7 |"; for (int n = 0; n <= 10; n++) cout << setw(3) << n * 7 << " |"; cout << endl; print_separator(); _getch(); }
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS !
Learn more about our help with Assignments:
C++
Comments
Leave a comment