K

@kimjuha19

원과 직사각형 클래스

C++
8 months ago
#include <iostream> using namespace std; class shape { public: virtual double area() = 0 }; class Circle;public shape { double radius; public:

구조체(학생 정보)

C++
8 months ago
#include <iostream> #include <cstring> using namespace std; struct Student { char name[20]; int score; int grade; void Studentprint(){

학생점수 평균 계산기

C++
8 months ago
#include <iostream> #include <string> using namespace std; class Person { protected: string name; public: Person(string n) : name(n) {} virtual void info() = 0;

동물소리 구하기

C++
8 months ago
#include <iostream> #include <string> using namespace std; class Animal { protected: string name; int age; public: Animal(string n, int a) : name(n), age(a) {}

c++(상품 할인 계산기)

C++
8 months ago
#include <iostream> using namespace std; class Product { public: int price; int discount; int fin; void finalPrice() {

c++(시험 합격자 판별)

C++
8 months ago
#include <iostream> using namespace std; class Stdent { private: int kor; int eng; int math; public: Stdent(int k ,int e,int m){

c++(최대공약수)

C++
9 months ago
#include <iostream> using namespace std; class GCD{ public: int a; int b; GCD(int x,int y){ a = x; b = y;

난수 맞추기

C++
9 months ago
#include <iostream> using namespace std; class GuessGame{ public: int target; GuessGame(){ srand(time(0)); target = rand() % 100 + 1; } void play(){

BMI 계산

C++
9 months ago
#include <iostream> using namespace std; class BMI { public: int cm; int kg; double a; BMI(int c,int k){ cm = c;

직사각형 넓이 & 대각선 길이

C++
9 months ago
#include <iostream> using namespace std; class Rectangle { public: int width; int height; int a; Rectangle(int w,int h){ width = w;

c++(계단 오르기 계산기)

C++
9 months ago
#include <iostream> using namespace std; class Stairs { public: int stair; int up; int fin; void stepNeeded() {

c++(상품 할인 계산기)

C++
9 months ago
#include <iostream> using namespace std; class Product { public: int price; int discount; int fin; void finalPrice() {

c++(영화 관람 등급 판별기)

C++
9 months ago
#include <iostream> using namespace std; class Movie { public: string name; int age; void checkAge() { if (age > 0) {

c++(사각형 종류 판별기)

C++
9 months ago
#include <iostream> using namespace std; class Rectangle { public: int width; int height; void type() { if (width > 0 && height > 0) {

c++(책 관리 시스템)

C++
9 months ago
#include <iostream> using namespace std; class Book { public: string name; int page; void isLongBook() { if (page > 0) {

생성자(은행계좌)

C++
9 months ago
#include <iostream> using namespace std; class Account { public: string name; int balance = 0; void deposit(int m) { balance += m;

생성자(최대값)

C++
9 months ago
#include <iostream> using namespace std; class Number { private: int a,b,c; public: Number(int aa ,int bb,int cc){ a = aa; b = bb;

생성자(성적 평균 계산)

C++
9 months ago
#include <iostream> using namespace std; class Stdent { private: int kor; int eng; int math; public: Stdent(int k ,int e,int m){

생성자(직사각형 둘레와 넓이)

C++
9 months ago
#include <iostream> using namespace std; class Rectangle { private: int height; int width; public: Rectangle(int h ,int w){ height = h;

생성자(원의 넓이)

C++
9 months ago
#include <iostream> using namespace std; class Circle { private: float radius; public: Circle(int r){ radius = (float)r; }