#include<stdio.h>
#include<windows.h>
int main()
{
FILE *fp;
char words[100];
HANDLE hconsole;
int i;
fp=fopen("C:\\Documents and Settings\\Administrator\\Desktop\\abdullah.txt","r");
while(fgets(words,100,fp))
{
puts(words);
hconsole=GetStdHandle(STD_OUTPUT_HANDLE);
for(i=0;i<2;i++){
SetConsoleTextAttribute(hconsole,i);
printf("change color %s",i);
}
SetConsoleTextAttribute(hconsole,7);
}
fclose(fp);
system("pause");
return 0;
}
#include<windows.h>
int main()
{
FILE *fp;
char words[100];
HANDLE hconsole;
int i;
fp=fopen("C:\\Documents and Settings\\Administrator\\Desktop\\abdullah.txt","r");
while(fgets(words,100,fp))
{
puts(words);
hconsole=GetStdHandle(STD_OUTPUT_HANDLE);
for(i=0;i<2;i++){
SetConsoleTextAttribute(hconsole,i);
printf("change color %s",i);
}
SetConsoleTextAttribute(hconsole,7);
}
fclose(fp);
system("pause");
return 0;
}