목차
//이진 가산기를 만들어라
//단 입력되는 이진수들의 크기는 같다
//vs 2005 에서 컴파일 확인 했습니다
//단 입력되는 이진수들의 크기는 같다
//vs 2005 에서 컴파일 확인 했습니다
본문내용
//이진 가산기를 만들어라
//단 입력되는 이진수들의 크기는 같다
#include
#include
#include
using namespace std;
class state
{
string state_str;
public:
int size;
state() //생성자
{
size=0;
}
state(int s) //생성자
{
state_str.append(s+1,'0'); //s+1 인 경우는 1 과 1을 더했을 시 01 이 되듯 한자리가 더
// 필요하기 때문이다
size=s;
}
//단 입력되는 이진수들의 크기는 같다
#include
#include
#include
using namespace std;
class state
{
string state_str;
public:
int size;
state() //생성자
{
size=0;
}
state(int s) //생성자
{
state_str.append(s+1,'0'); //s+1 인 경우는 1 과 1을 더했을 시 01 이 되듯 한자리가 더
// 필요하기 때문이다
size=s;
}
소개글