UVA Solution 499 - What's The Frequency, Kenneth - Solution in C,C++ - Volume 4
UVA Online Judge Solution 499 - What's The Frequency, Kenneth | Volume 4
UVA Problem Link -499 - What's The Frequency, Kenneth
Problem Name: 499 - What's The Frequency, Kenneth code
Problem Number : UVA - 499 - What's The Frequency, Kenneth solution
Online Judge : UVA Online Judge Solution
Volume: 4
Solution Language : C, C plus plus
UVA Solution 499 - What's The Frequency, Kenneth Code in C, CPP:
#include <stdio.h> int main() { char str[999]; while(gets(str)) { int ascii[128] = {}, i; for(i = 0; str[i]; i++) { if(str[i] >= 'a' && str[i] <= 'z') ascii[str[i]]++; if(str[i] >= 'A' && str[i] <= 'Z') ascii[str[i]]++; } int f = 0; for(i = 0; i < 128; i++) f = f > ascii[i] ? f : ascii[i]; for(i = 0; i < 128; i++) if(f == ascii[i]) putchar(i); printf(" %d\n", f); } return 0; }
Tags: UVA Online Judge Solution, UVA OJ Solution list, UVA Problems Solution, UVA solver, UVA all problem solution list, UVA 499 - What's The Frequency, Kenneth code in C, UVA 499 - What's The Frequency, Kenneth code in C++, UVA solution in C, UVA 499 - What's The Frequency, Kenneth solution
No comments:
Post a Comment