A program that generates table of a number input by user
// Stacklink.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int table, tbl_value,index=1;
cout<<"Input value for which table is required ";
cin>>table;
cout<<endl;
cout<<"Input value upto which table is required ";
cin>> tbl_value;
while (index < tbl_value+1)
{
cout<<table<<" * "<< index<<" = "<<table * index<<endl;
index++;
}
}
Comments
Post a Comment