/*------------------------------------------------------------------------------*
* File Name: *
* Creation: *
* Purpose: OriginC Source C file *
* Copyright (c) ABCD Corp. 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 *
* All Rights Reserved *
* *
* Modification Log: *
*------------------------------------------------------------------------------*/
////////////////////////////////////////////////////////////////////////////////////
// Including the system header file Origin.h should be sufficient for most Origin
// applications and is recommended. Origin.h includes many of the most common system
// header files and is automatically pre-compiled when Origin runs the first time.
// Programs including Origin.h subsequently compile much more quickly as long as
// the size and number of other included header files is minimized. All NAG header
// files are now included in Origin.h and no longer need be separately included.
//
// Right-click on the line below and select 'Open "Origin.h"' to open the Origin.h
// system header file.
#include <Origin.h>
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
// Include your own header files here.
////////////////////////////////////////////////////////////////////////////////////
// Start your functions here.
void fillnumbers()
{
matrix mat(9,9);
for(int x=0;x<mat.GetNumRows();x++)
{
for(int y=0;y<=x;y++)
{
mat[x][y]=(x+1)*(y+1);
printf("%x*%x=%g ",x+1,y+1,mat[x][y]);
}
printf("\n");
}
}fillnumbers()
最新推荐文章于 2021-10-15 11:37:53 发布
本文介绍了一个使用OriginC语言填充矩阵的示例程序。该程序创建了一个9x9的矩阵,并通过双重循环逐行填充矩阵元素,每个元素的值为其所在行号与列号的乘积加一。
1万+

被折叠的 条评论
为什么被折叠?



