C++ program to write a multiplication table

C++ program to write a multiplication table



source code:

#include<iostream>
using namespace std;
int main(){
    int t;
    cout<<"Enter the no. of test cases " <<endl;
    cin>>t;
    for(int j=1;j<=t;j++){
    int n;
    cout<<"Enter the number whose multiplication table you want : "<<endl;
    cin>>n;
    forint i=1;i<=10;i++){
        cout<<n<<" * "<<i<<" = "<<n*i<<endl;
    }
    }
   
    } 

output: 

visit : youtube.com/c/codewithdhiru 
for more

Oldest