전체 글

#pragma once #ifndef ARRAYSTACK_H #define ARRAYSTACK_H #include #include typedef int ElementType; typedef struct tagNode { ElementType Data; } Node; typedef struct tagArrayStack { int Capacity; int Top; Node* Nodes; }ArrayStack; void AS_CreateStack(ArrayStack** Stack, int Capacity); void AS_DestroyStack(ArrayStack* Stack); void AS_Push(ArrayStack* Stack, ElementType Data); ElementType AS_Pop(Arr..
Score.h #pragma once typedef struct { int number; double score; } Score; Score DataSet[] = { /* 번호, 점수*/ 1, 877.88, 2, 176.23, 3, 365.92, 4, 162.44, 5, 148.86, 6, 89.74, 7, 342.52, 8, 811.02 }; BinarySearch.c #include #include #include "Score.h" Score* BinarySearch(Score ScoreList[], int Size, double Target) { int Left, Right, Mid; Left = 0; Right = Size - 1; while (Left ScoreList[Mid].score) { ..
#include #include using namespace std; int main(){ int NUM; scanf("%d", &NUM); int i = 2; while(NUM != 0 && i
#include #include using namespace std; bool find_prime_num(int n){ if(n == 1) return false; for(int i = 2; i < n; ++i){ if(n % i == 0) return false; } return true; } int main(){ int M, N; scanf("%d %d", &M, &N); int sum = 0, min = 0; bool check = false; for(int i = M; i
오뚜깅
오뚜깅