본문 바로가기

분류 전체보기140

temp #include #include #include #include #define MAX_NAME 50typedef struct { char name[MAX_NAME]; char type[10]; double x, y; double score;} Restaurant;// 함수 프로토타입Restaurant* addRestaurant(Restaurant* restaurants, int* count);int* recommendRestaurants(Restaurant* restaurants, int count, const char* type, double x, double y, double minScore);void printRecommendedRestaurants(Restaurant* res.. 2024. 12. 10.
Calculator with Swing import javax.swing.*;import java.awt.*;import java.awt.event.*;public class EX6 extends JFrame { private JTextField tfInput; // 수식 입력 필드 private JTextField tfOutput; // 결과 출력 필드 public EX6() { super("Calculator"); setDefaultCloseOperation(EXIT_ON_CLOSE); Container c = getContentPane(); c.setLayout(new BorderLayout()); c.add(new northPanel(), BorderLayo.. 2024. 12. 6.
Money Changer with CheckBox import javax.swing.*;import java.awt.*;import java.awt.event.*;public class EX4 extends JFrame{ private JPanel upPanel; private JPanel centerPanel; private String[] money= {"오만원","만원","천원","500원","100원","50원","10원","1원"}; private int[] mn= {50000,10000,1000,500,100,50,10,1}; private JTextField[] mtf=new JTextField[mn.length]; private JCheckBox[] mcb=new JCheckBox[mn.length]; private boolean [] c.. 2024. 12. 6.
미로탐색 레벨 순회(Level Order) 제출본#include #include #define MAX_QUEUE_SIZE 100void print_maze(int rows, int cols,int maze[rows][cols],int currRow, int currCol);void move(int rows,int cols,int maze[rows][cols], int *currRow, int *currCol, int newRow, int newCol);typedef struct { int x; int y;} Position;typedef struct TreeNode { Position data; struct TreeNode *left, *right, *up, *down;} TreeNode;typedef TreeNode* el.. 2024. 11. 17.
이중 연결리스트(DoublyLinkedList) 이중 연결리스트(DoublyLinkedList) 2024. 10. 29.
원형 연결리스트(CircularLinkedList) 원형 연결리스트(CircularLinkedList) 2024. 10. 29.