KakaoTalk_20190606_001802318.png
  • 246x0w
Welcome
Curriculum
Install&Go
Board
실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
  • 카테고리
  • 전체 게시물
  • 내 게시물
이재민
2020년 7월 14일

200714

게시판: 소스 코드 제출

/*

#include <iostream>

#include <string>


using namespace std;


int main()

{

string s;

int cnt;

getline(cin,s,'\n');

cnt=s.find('a');

cout << cnt ;

}

*/











/*

#include <iostream>

#include <string>


using namespace std;


class sample

{

int *p;

int size;

public:

sample(int n)

{

size=n; p=new int [n];

}

void read();

void write();

int big();

~sample();

};


void read()

{

p

}


int main()

{

sample s(10);

s.read();

s.write();

cout << s.big();

}

*/






/*



#include <iostream>

#include <string>

#include <cstdlib>

#include <ctime>

using namespace std;


int main()

{

string s;

getline(cin,s,'\n');

srand((unsigned)time(0));

char a=rand();

s.insert(2,a);

cout << s;

}


*/

















/*

#include <iostream>

#include <string>


using namespace std;



class circle

{

int radius;

public:

void setradius(int radius)

{

this->radius=radius;

}

double getarea()

{

return 3.14*radius*radius;

}

};




int main()

{

int k;

circle circle[3];

for (int i=0; i<3; i++)

{

cin >> k;

circle[i].setradius(k);

}


int cnt=0;

for (int i=0; i<3; i++)

{

if (circle[i].getarea()>100)

{

cnt++;

}


}

cout << cnt;


}

*/






#include <iostream>

#include <string>


using namespace std;


class person

{

string name;

string tel;

public:

person();

string getname()

{

return name;

}

string gettel()

{

return tel;

}

void set(string name,string tel)

{

this->name=name;

this->tel=tel;

}

};


person::person()

{

this->name=name;

}


int main()

{

person s[3];

for (int i=0; i<3; i++)

{

string name;

string tel

cin >> name >> tel;

s[i] = new person();

s[i].set(name, tel);

}

for (int i=0; i<3; i++)

{

}

for (int i=0; i<3; i++)

{

}

}














댓글 0개
0
댓글
댓글 0개
유사 게시물
  • 200714
  • 200714
  • 200714
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호