Anonymous user
Pangram checker: Difference between revisions
→{{header|C}}: drop unneeded headers; slight cleanup
(→{{header|TXR}}: Stray text removed.) |
(→{{header|C}}: drop unneeded headers; slight cleanup) |
||
Line 232:
=={{header|C}}==
<lang C>#include <stdio.h>
int isPangram(const char *string)
{
char ch, wasused[26] = {0};
int total = 0;
while ((ch = *string++)) {▼
▲ while (ch = *string++) {
int index;
Line 250 ⟶ 247:
else
continue;
if(!wasused[index]) {▼
}
return (total==26);
Line 260 ⟶ 256:
int main()
{
int i;
const char *pangram = "The quick brown fox jumps over the lazy dog.";▼
const char *
printf("\"%s\" is %sa pangram\n", pangram, isPangram(pangram)?"":"not ");▼
"The qu1ck brown fox jumps over the lazy d0g."
};
for (i = 0; i < 2; i++)
tests[i], isPangram(tests[i])?"":"not ");
return 0;
}</lang>
|