2019.03.11 10:53
2. 예제 파일 설치하기
Static (154 KB) | DLL (192 KB) | |
Static (1,096 KB) | DLL (866 KB) | |
Static (190 KB) | DLL (229 KB) | |
Static (972 KB) | DLL (681 KB) |
2019.03.13 09:20
2019.03.13 09:32
개행문자
줄바꿈
printf("\n \n \n \n \n \n \n \n ");
2019.03.13 09:32
2019.03.13 09:35
2019.03.13 09:37
햄스터 노래 시키기 - 반복문 이용하기
#include <stdio.h>
#include <stdlib.h>
#include "roboid.h"
int main(int argc, char *argv[]) {
int i, j;
hamster_create();
for(i = 0; i < 2; ++i) {
for(j = 0; j < 2; ++j) {
hamster_note(HAMSTER_NOTE_C_4, 0.5);
hamster_note(HAMSTER_NOTE_E_4, 0.5);
hamster_note(HAMSTER_NOTE_G_4, 0.5);
}
for(j = 0; j < 3; ++j) {
hamster_note(HAMSTER_NOTE_A_4, 0.5);
}
hamster_note(HAMSTER_NOTE_G_4, 1);
hamster_note(0, 0.5f);
for(j = 0; j < 3; ++j) {
hamster_note(HAMSTER_NOTE_F_4, 0.5);
}
for(j = 0; j < 3; ++j) {
hamster_note(HAMSTER_NOTE_E_4, 0.5);
}
for(j = 0; j < 3; ++j) {
hamster_note(HAMSTER_NOTE_D_4, 0.5);
}
hamster_note(HAMSTER_NOTE_C_4, 1);
hamster_note(0, 0.5);
hamster_tempo(120); // speed up
}
// don't forget to dispose
dispose_all(); // disconnect and release memory
return 0;
}
2019.03.13 09:38