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

20190814 c++

게시판: 소스 코드 제출

/*

#include <iostream>


using namespace std;


int main()

{

int k, v;

double a;


cin >> k >> v;

cin >> a;


cout << k << " " << v << "\n";

cout << "Hello world!" << endl;

return 0;

}

*/

/*

#include <iostream>

#include <cmath>


using namespace std;


int main()

{

double x = 2.5, y;


int k;

cin >> k;


int arr[k];

//y = pow("x", 3.0);

//y = pow(x + 3.0);


for(int i=0; i<k; i++){

int asdasd;

}



y = pow(x, 3.0);

y = pow(x, 3);


cout << "2.5 raised to 3 yields: "

<< y << endl;


cout << "2 + (5 raised to the power 2.5) yields: "

<< 2.0 + pow(5.0, x) << endl;




return 0;

}

*/

/*

#include <iostream>

#include <stdio.h>


using namespace std;


class student {

private:

int p;

public:

char name[1000];

int k;

void input();

int output();

void introduce();

protected:

int a;

};


void student::input() {

k = 10;

a = 10;

}


int student::output() {

return k;

}


void student::introduce() {

printf("My name is ");

output();

cout << "aa" << k << endl;

}


int main() {

student hakseng[100];

//justin.input();

//printf("%d\n", justin.k);

//printf("%d", justin.output());

}

*/

/*

#include<stdio.h>

#include <iostream>


using namespace std;


class student{


public:

char name[1000];

int korean;

int english;

int math;

int sum;

double average;

double koreanaverage;


void input();

void calcuSelf();

void calcuSelf(int history);

void print();


};


void student::input() {

cin >> name;

cin >> korean >> english >> math;

calcuSelf();

}


void student::calcuSelf() {

sum = korean + english + math;

average = (korean + english + math)/3.0;


}


void student::calcuSelf(int history) {

sum += history;

}


int main() {

student hakseng[5];


for(int i=0; i<5; i++) {

hakseng[i].input();

}

//cout << hakseng[0].average;

for(int i=0; i<5; i++) {

cout << hakseng[i].name << ":\t" << hakseng[i].korean << "\t" << hakseng[i].english << "\t" << hakseng[i].math << "\t" << hakseng[i].average << endl;

}

int total = 0;

for(int i=0; i<5; i++) {

total += hakseng[i].korean;

}

cout << total / 5.0 << "\t";

total = 0;

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

{

total += hakseng[i].english;

}

cout << total / 5.0 << "\t";

total = 0;

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

{

total += hakseng[i].math;

}

cout << total /5.0 << "\t";


return 0;

}

*/


class sum {

public:

// int int // int double // double int // double double

int plus1(int a, int b);

double plus1(int a, double b);

};






int main() {

sum abc;

cout << abc.plus1(1.2, 2.5);

}

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