- 2

write a c++ program to display the multiplication table of a number with 12 rows

17th Jul 2016, 1:36 PM
Don john
Don john - avatar
6 Respuestas
+ 3
#include <iostream> using namespace std; int main() { int num,i; cout<<"Enter a number:\n "; cin>>num; cout<<"Entered number:"<<num<<endl; for(i=1;i<13;i++) { cout<<num*i<<endl; } return 0; }
17th Jul 2016, 2:47 PM
Karan Luther
Karan Luther - avatar
+ 1
#include <iostream> using namespace std; int main( ) { int a; cout <<"Enter a number to generate it's multiplication table: "; cin >> a; for ( int b = 1; b <= 12; b++ ) cout << a << " * " << b << " = " << a*b << "\n" << endl; return 0; }
17th Jul 2016, 4:09 PM
Spencer Marshalls
Spencer Marshalls - avatar
+ 1
I need the output of thi question
16th Jun 2019, 10:00 AM
Neeraja S Nair
Neeraja S Nair - avatar
0
<#include iostream.h> void main() { int i=1; for(i=1;i<13;i++) { cout<<(n*i); /*here n is any number user wants the table of*/ return 0; } }
17th Jul 2016, 1:55 PM
Bhoomi
Bhoomi - avatar
0
#include <iostream> using namespace std; int main() { int n, term, i; cout << "Enter a number to print multiplication table\n"; cin >> n; cout << "Enter number of terms in table\n"; cin >> term; /* Generate multiplication table */ for(i = 1; i <= term; ++i){ cout << n << " X " << i << " = " << n*i << endl; } return 0; } Above c program prints the multiplication table of any number till N rows. IN your case you need to enter number of terms as 12. http://www.techcrashcourse.com/2016/03/cpp-program-to-print-multiplication-table.html http://www.techcrashcourse.com/2015/08/c-program-print-multiplication-table-number.html
14th Apr 2017, 12:19 PM
Arun Kumar
Arun Kumar - avatar
0
Write a C++ program to display the multiplication table of a given number having 12 raws.
30th Jan 2023, 12:39 AM
Joel John
Joel John - avatar