Problem1999--1999年秋浙江省计算机等级考试二级C 编程题(2)

1999: 1999年秋浙江省计算机等级考试二级C 编程题(2)

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 1  Solved: 1
[Status] [Submit] [Creator:]

Description

编制程序,统计文本stdin中字符$出现的次数,并将结果写入文件stdout

Input

字符文本

Output

$次数

Sample Input Copy

as$dfkjhkjkjdhf
asdfkj$lskdfj
werijweirjo$wie 

Sample Output Copy

3

HINT

#include <stdio.h>
int main(){
  FILE *p;
  .....
  //p=fopen("data.txt","r");
  p=stdin;
  .....
  //p=fopen("res.txt","w");
  p=stdout;
  ....
  return 0; 
}