A Developer Gateway To IT World...

Techie Uncle Software Testing Core Java Java Spring C Programming Operating System HTML 5 Java 8 ES6 Project

Write a program to make table in c++

#include<iostream>
using namespace std;
int main()
{
    int i;
    int n;
    int table[10];
    cout<<"Enter n=";
    cin>>n;
    for(i=1; i<=10; i++)
    {
        table[i] = n*i;
        //cout<<table[i]<<endl;
    }
    cout<<"Displaying";
    for(i=1; i<=10; i++)
    {
        cout<<table[i]<<endl;
    }
}



Method 2:



#include<iostream>
using namespace std;
int main()
{
    int i;
    int n;
    cout<<"Enter n=";
    cin>>n;
    for(i=1; i<=10; i++)
    {
        int table = n*i;
        cout<<table<<endl;
    }
   
}


LEARN TUTORIALS

.

.