[ create a new paste ] login | about

Link: http://codepad.org/dTbY0J8S    [ raw code | output | fork ]

박정욱 - C++, pasted on May 11:
//객체 2번 구구단 
#include<iostream>
using namespace std;

#define gu 9

int gugu[gu][gu];

void NUM_IN();
void cout_gugu();

void main()
{
	NUM_IN();	
	cout_gugu();
}

void NUM_IN()
{
	int i,j;
	for(i=1;i<gu+1;i++)
	{	for(j=1;j<gu+1;j++)
		{	gugu[i][j]= i*j;	}
	}
}
void cout_gugu()
{
	int i,j;
	for(i=1; i<gu+1 ;i++)
	{	for(j=1; j<gu+1 ;j++)
		{	cout << i <<" X " << j << " = " << gugu[i][j] << endl;}
	}
}
	


Output:
1
2
Line 12: error: '::main' must return 'int'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: