C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[55992] while loop질문입니다
정진호 [] 734 읽음    2009-02-04 12:38
야래는 제가 짠 프로그램이구요 매트릭스 구하는 프로그램입니다
아웃풋이 a(0,0)= , a(1,0)= ,,,,,
              a(1,0)=, a(1,1),....
               .....
                                                    a(4,4)=
까지 구하는 문제인데요 아무리 해도 구할수가 없습니다 어떤때는 텍스트 파일이 아예 열리질 않고 어떤땐
매트릭스가 제대루 안구해지고요 도와주세요
#include <iostream>
#include<fstream> //required for ifstream, ofstream
#include <iomanip>
using namespace std;

int main(){
   
    //define file streams for output
    ofstream fout;
    string filename;
   
    cout<<"input the file name: ";
    cin>>filename;
    fout.open(filename.c_str(), ios::app);
    if (fout.fail()){//check for errors
    cout<<"Could not open output file "<<endl;
    exit(1);//return error value 1 to system
}

    int i=0;
    int j=0;
   
    while (i<5){
    i++;
          
           while(j<5){
             
           j++;
           }         
           }
fout<<"A("<

+ -

관련 글 리스트
55992 while loop질문입니다 정진호 734 2009/02/04
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.