1 Replies - 5194 Views - Last Post: 16 March 2009 - 10:05 AM Rate Topic: -----

#1 drummond2000   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 16-March 09

Multiplication Table C++ code

Posted 16 March 2009 - 08:53 AM

// write in microsoft visual studio 2008
// Done By : Oneil Drummond 

#include "stdafx.h"
#include "iostream"

using namespace std;


int main()
{
	int num =0;
	int time = 0;
	int option =0;
 while (option >=0)
 {
	cout << " Time Table C++ ver 0.0.1"<<endl;
	cout << "  done by : Oneil Drummond"<<endl;
	cout << "  email   :[email protected]"<<endl;
	cout <<endl << endl;

	cout << " Enter the number you want to see Time table for"<<endl;
    cout << endl <<endl;

	cout<<"+++++++Number limited 10000+++++++"<<endl;
	cout << endl << endl;

	cout << " Enter Number :"; cin >> num;

	if (num < 10000)
	{

	cout << "1  * "<< num << " = " <<(time = num *1)<<endl;
	cout << "2  * "<< num << " = " <<(time = num *2)<<endl;
	cout << "3  * "<< num << " = " <<(time = num *3)<<endl;
	cout << "4  * "<< num << " = " <<(time = num *4)<<endl;
	cout << "5  * "<< num << " = " <<(time = num *5)<<endl;
	cout << "6  * "<< num << " = " <<(time = num *6)<<endl;
	cout << "7  * "<< num << " = " <<(time = num *7)<<endl;
	cout << "8  * "<< num << " = " <<(time = num *8)<<endl;
	cout << "9  * "<< num << " = " <<(time = num *9)<<endl;
	cout << "10 * "<< num << " = " <<(time = num *10)<<endl;
	cout << "11 * "<< num << " = " <<(time = num *11)<<endl;
	cout << "12 * "<< num << " = " <<(time = num *12)<<endl;
	cout << endl << endl;

	cout << "-1 Exit / 1 To Enter a next number: "; cin >> option;
	system ("cls");
	}
	else
	{ 
	cout << endl << endl;
	cout << " Sorry You have gone Over you limit (10000) 1. try again / -1 exit: "; cin >> option;
	system ("cls");
	}

 }
 	return 0;
}


*** MOD EDIT: Added code tags. Please :code: ***

This post has been edited by JackOfAllTrades: 16 March 2009 - 10:04 AM


Is This A Good Question/Topic? 1

Replies To: Multiplication Table C++ code

#2 JackOfAllTrades   User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: Multiplication Table C++ code

Posted 16 March 2009 - 10:05 AM

As with your other post, is there a question here?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1