Program to create a multiplication table of a given number using while loop.

Using Visual Studio 2015


===============================================================

#include<iostream>
using namespace std;
#include<conio.h>
void main()
{

 int num , value, mul;
 cout<<"enter the number=";
 cin>>num;
 cout << "Multiplication Table for " << num << " :- " << endl;
 mul = 1;
 while (mul <= 10)
 {

  value = num * mul;
  cout << num << " * " << mul << " = " << value << endl;
  mul++;

 }
 _getche();
}


Comments

Popular posts from this blog

Suppose you are given a square matrix of size n x n, write a program to determine if this is an identity matrix. 2D array

Program to find equal values using if statement in C++