62 560
Assignments Done
98,8%
Successfully Done
In June 2018

Answer to Question #24286 in C++ for gaurav chauhan

Question #24286
how can i print a multiplication table of 7
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions