Monday 25 April 2016

C++ Programming how to Find a Table of any Number

This code will Print Table of any Number(including decimal number) using C++ Language 



Program # 2 : Printing a table of any Number ( Including decimal numbers)



#include <iostream>
#include <stdio.h>

using namespace std;

int main()
{

   float a,i;
   do{
   cout << " Which Table do you want to Print or 0 to Quit? \n";
   cin >> a;

   for(i=1; i<=10; i++)
   cout << a << " * " << i << " = " <<  a * i  << endl;
   }while(a='0');
    return 0;
}

Output of the program : 



0 comments:

Post a Comment