广告广告
  加入我的最爱 设为首页 风格修改
首页 首尾
 手机版   订阅   地图  繁体 
您是第 3350 个阅读者
 
发表文章 发表投票 回覆文章
  可列印版   加为IE收藏   收藏主题   上一主题 | 下一主题   
daily
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x0
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片
推文 x0
[C/C++][求助] 矩阵换算
#include<iostream>
using namespace std;
int main()
{
    int math={{1,1,2},{2,3,5}};
 int temp={};
 do{
  if(math!=1)
  {
       temp=math-math;
          temp=math-math;
    temp=math-math;
  }
  if ..

访客只能看到部份内容,免费 加入会员 或由脸书 Google 可以看到全部内容



献花 x0 回到顶端 [楼 主] From:台湾教育部 | Posted:2010-03-21 11:40 |
teldeanmac85 手机
个人文章 个人相簿 个人日记 个人地图
初露锋芒
级别: 初露锋芒 该用户目前不上站
推文 x1 鲜花 x21
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

复制程式
#include<iostream>
using namespace std;

int main(int argc, char* argv[])
{
   int i,j ;
   int math[2][3]={{1,1,2},{2,3,5}};
   int temp[2][3];
   
   do{
      if(math[0][0]!=1)
      {
         temp[0][0]=math[0][0]-math[0][0];
         temp[0][1]=math[0][1]-math[0][1];
         temp[0][2]=math[0][2]-math[0][2];
      }
      if(math[0][0]==1)
      {
         do{
            temp[0][0]=math[0][0];
            temp[0][1]=math[0][1];
            temp[0][2]=math[0][2];
            temp[1][0]=math[1][0]-math[0][0];
            temp[1][1]=math[1][1]-math[0][1];
            temp[1][2]=math[1][2]-math[0][2];
         }while(temp[1][0]!=0);
      }
   }while(temp[0][0]!=1 && temp[1][0]==0);
       
   for(i=0;i<2;i++)
   {
      for(j=0;j<3;j++)
      {
         cout<<temp[i][j]+"   ";
      }
   }
   return 0;
}

你的Array宣告错误
所以compiler会有很多错误讯息
你的运算方式看了一下
应该程式无法结束 因为会在loop里面一直跑


献花 x0 回到顶端 [1 楼] From:台湾新世纪 | Posted:2010-03-26 09:15 |
daily
个人文章 个人相簿 个人日记 个人地图
路人甲
级别: 路人甲 该用户目前不上站
推文 x0 鲜花 x0
分享: 转寄此文章 Facebook Plurk Twitter 复制连结到剪贴簿 转换为繁体 转换为简体 载入图片

谢谢 大大的帮忙
我知道了
我在试试看
谢谢~


献花 x0 回到顶端 [2 楼] From:台湾教育部 | Posted:2010-03-31 09:32 |

首页  发表文章 发表投票 回覆文章
Powered by PHPWind v1.3.6
Copyright © 2003-04 PHPWind
Processed in 0.019838 second(s),query:16 Gzip disabled
本站由 瀛睿律师事务所 担任常年法律顾问 | 免责声明 | 本网站已依台湾网站内容分级规定处理 | 连络我们 | 访客留言