Preciso da ajuda de vocês em um programa

Started by Fox, 01 de September , 2006, 09:23:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Anonymous

Resposta...funcionando perfeitamente

#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main()
{
char ch;
FILE *v = fopen("vogal.txt", "w");
FILE *c = fopen("consoante.txt", "w");
while( (ch = getch()) != 27 )
{
if( ch == 32 )printf(" ");
if( ch == 13 )printf("\n");
if( (ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 123) )
{
            printf("%c", ch);
switch( ch )
{
case 'A':
case 'a':
case 'E':
case 'e':
case 'I':
case 'i':
case 'O':
case 'o':
case 'U':
case 'u':
{
fputc(ch, v);
}break;
default:
{
fputc(ch, c);
}break;
}
}
}
fclose(c);
fclose(v);
}

Fox

Pra quem se interessou em ajudar obrigado!
Vlw mesmo!