C++ Program to Print Multiplication Table of 7
C++ program to print multiplication table of 7 is provided on this page.
Well, you already know what a multiplication table. It is a table which contains two colums first contains same number througout all rows and second usually contains numbers ranging from 1 to 10.
We call this table multiplication table for number N, where N is the number in first column.
This is really a simple concept because we all have gone through it, still wrote few lines.
Aim of this program is to write a multiplication table of 7, range will be 1 to 10 but you can increase it to whatever you like.
C++ program to print multiplication table of 7
Here is the c++ program that prints multiplication table of 7. It print the product of number 7 to numbers from 1 to 10.
#include <iostream>
using namespace std;
int main()
{
int number = 7 ;
cout<<"Multiplication table of 7: \n";
for(int i = 1; i< = 10; i++)
cout<<"number * "<< i <<" = "<< number * i<<endl;
}
Output:
Multiplication table of 7: 7 * 1 = 7 7 * 2 = 14 7 * 3 = 21 7 * 4 = 28 7 * 5 = 35 7 * 6 = 42 7 * 7 = 49 7 * 8 = 56 7 * 9 = 63 7 * 10 = 70
Comments
Post a Comment