top of page

프로필

가입일: 2021년 11월 14일

소개

13 개의 좋아요
0 개의 댓글
0 개의 베스트 답변

gotoxy 함수

#include<stdio.h>

#include<math.h>

#include<time.h>

#include<windows.h>

void gotoxy(int x, int y) {

COORD Pos;

Pos.X = x;

Pos.Y = y;

SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), Pos);

}


최대공약수/최소공배수

int gcd(int a, int b) // a와 b의 최대공약수

{

if(a==0) return b;

return gcd(b%a, a);

}

int lcm(int a, int b)

{

return a*b/gcd(a,b);

}

Twisted_

더보기
bottom of page