matrix table using asterisk

output depends on inputted number(s) of row & colum

Page 1 of 1

3 Replies - 1679 Views - Last Post: 13 November 2007 - 07:47 PM Rate Topic: -----

#1 janandrada  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 27-September 07

matrix table using asterisk

Post icon  Posted 13 November 2007 - 06:53 AM

help me please...... in making matrix table using asterisk
if I inputted 2 for the row and 4 for column,
the output should be:
****
****

 int row, col, y;
	y = 0;
	cout<<"Enter number of row"<<endl;
	cin>>row;
	cout<<"Enter number of column"<<endl;
	cin>>col;
	col = col - 1;
	while(y < row){
			cout<<"*"<<endl;
			row--;
			while(y < col){
					cout<<"*";
					col--;
					}



Is This A Good Question/Topic? 0
  • +

Replies To: matrix table using asterisk

#2 janandrada  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 27-September 07

Re: matrix table using asterisk

Posted 13 November 2007 - 06:59 AM

by the way i should use only loop...
thnx
Was This Post Helpful? 0
  • +
  • -

#3 PennyBoki  Icon User is offline

  • system("revolution");
  • member icon

Reputation: 53
  • View blog
  • Posts: 2,334
  • Joined: 11-December 06

Re: matrix table using asterisk

Posted 13 November 2007 - 08:01 AM

Well what seems to be the problem?
Are you receiving some errors?
Was This Post Helpful? 0
  • +
  • -

#4 janandrada  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 27-September 07

Re: matrix table using asterisk

Posted 13 November 2007 - 07:47 PM

the problem is it does not show a table...

the row is correct, but the column don't do
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1