IT_forum_J

IT_forum_J

  • 분류 전체보기 (26)
    • Algorithm (1)
    • Spring (6)
    • JAVA (0)
    • GitHub (3)
    • 소프트웨어공학 (1)
    • Python (8)
    • 끄적끄적 (2)
    • 프로젝트 (3)
    • AI (0)
    • C (2)
  • 홈
  • 태그
  • 방명록
  • GitHub
RSS 피드
로그인
로그아웃 글쓰기 관리

IT_forum_J

컨텐츠 검색

태그

C javascript DI 코딩테스트 openapi ActivityDiagram xml2js spring 프로그래머스 프로젝트 꽃추천 Flora react branch springboot github 기초 PYTHON 시스템모델링 데이터누리집

최근글

댓글

공지사항

아카이브

C(3)

  • [Algorithm] Bubble Sort

    📌 What is bubble sort? 0 ~ N 번째 배열까지의 값을 순서대로 비교 총 n - 1번 수행 인접한 두 자료를 비교하여 오름차 순으로 저장되어 있지 않으면 교환 flag 변수를 사용하여 한번의 pass동안 한번도 교환이 이뤄지지 않으면 끝내도록 개선 값을 임시 저장할 temp, 총 시행횟수 i, 배열의 현재위치 및 비교위치 j로 할당 import time.h의 srand 함수를 사용하여 랜덤함수 발급 📌 Code #define _CRT_SECURE_NO_WARNINGS #include #include #include #define N 10 void bubble(int arr[], int n) { int i = n - 1, j, tmp, flag = 1; while (flag && i !=..

    2024.04.04
  • [C] 이차방정식 계산

    #define _CRT_SECURE_NO_WARNINGS #include #include int main() { double a, b, c; while (1) { printf("Input coefficients(A, B, C) : "); int rV = scanf("%lf %lf %lf", &a, &b, &c); if (rV 0) { double root1 = (-b + sqrt(result)) / 2 * a; double root2 = (-b - ..

    2024.03.27
  • [C] 시프트 연산자를 이용한 bit 변환

    📌 정수 => bit #define _CRT_SECURE_NO_WARNINGS #include int main() { int temp; printf("Input number : "); scanf("%d", &temp); for(int i=31; i>=0; i--) { printf("%d", (temp >> i) & 1); } } 📌 실수 => bit // 배정밀도 초과수 : 1023 / 단정밀도 초과수 : 127 #define _CRT_SECURE_NO_WARNINGS #include #include int main() { double temp; long long int* p = (long long int*)&temp; printf("Input number : "); scanf("%lf", &temp);..

    2024.03.27
이전
1
다음
티스토리
© 2018 TISTORY. All rights reserved.

티스토리툴바