Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
#define MAX 505 int main(int argc, char* argv[]) { FILE *input = fopen(argv[1], "r"); FILE *output = fopen(argv[2], "w"); if(input == NULL) { printf("Ne e dobro!"); return 0; } char niza[MAX]; while(fgets(niza, 100, input)) { int brojac[26]; for(int i = 0; i < 26; i++) { brojac[i] = 0; } for(int i = 0; i < strlen(niza); i++) { niza[i] = tolower(niza[i]); } for(int i = 0; i < strlen(niza); i++) { brojac[niza[i] - 'a']++; } for(int i = 0; i < 26; i++) { if(brojac[i] > 0) { fprintf(output, "%c %d\n", (char)(i + 'a'), brojac[i]); } } fprintf(output, "\n"); } return 0; } /* 5 4 1 2 7 3 2 2 4 0 5 6 0 1 1 2 3 4 3 2 0 12 3 4 1 2 3 0 5 6 0 7 -1 -2 -3 12 */
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)