next up previous contents
Next: B.2 プログラムリスト: dat3.c Up: 付録B 音符の数値化と量子化のプログラム Previous: 付録B 音符の数値化と量子化のプログラム

B.1 プログラムリスト: dat2.c

  1: #include <stdio.h>
  2: #include <stdlib.h>
  3: #define MAX 300
  4: 
  5: main(){
  6:   char s[MAX];
  7:   char c;
  8:   int i;
  9:   gets(s);
 10:   while((c=getchar())!='/'){
 11:     if(c=='<'){
 12:       while(getchar()!='>'){}
 13:     }
 14:   }
 15:   gets(s);
 16:   gets(s);
 17:   if(s[0]=='-')gets(s);
 18:   while((c=getchar())!=EOF){
 19:     if(c==' '){
 20:       putchar('\n');
 21:     }else{
 22:       putchar(c);
 23:     }
 24:   }
 25: }


Deguchi Toshinori
1999年03月23日 (火) 15時43分49秒 JST