廣告廣告
  加入我的最愛 設為首頁 風格修改
首頁 首尾
 手機版   訂閱   地圖  簡體 
您是第 3318 個閱讀者
 
發表文章 發表投票 回覆文章
  可列印版   加為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.013261 second(s),query:16 Gzip disabled
本站由 瀛睿律師事務所 擔任常年法律顧問 | 免責聲明 | 本網站已依台灣網站內容分級規定處理 | 連絡我們 | 訪客留言