Results 1 to 3 of 3
Thread: EOF -
Hybrid View
-
19th July 2010 21:44 #1Registered User
Join Date: Jun:2010
Location:
Posts: 171
EOF -
, EOF , Windows dev C++
Code:#include <stdio.h> int main(int argc,char *argv[]) { int counts[26]={0}; int cypherChar=getchar(); while(cypherChar!=EOF) { if(islower(cypherChar)) { counts[cypherChar-'a']++; } cypherChar=getchar(); } printf("Freqency table\n"); int i='a'; while(i<='z') { printf("%c %d\n",i,counts[i-'a']); i++; } return 0; }Last edited by lludmill; 19th July 2010 at 21:52.
-
19th July 2010 22:00 #2
Control-Z ?
http://en.wikipedia.org/wiki/End-of-fileHave no fear ike iz here.
CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color
-
19th July 2010 22:05 #3Registered User
Join Date: Jun:2010
Location:
Posts: 171
enter control+Z enter
a a
Last edited by lludmill; 19th July 2010 at 22:15.




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in