#include<stdio.h>
#include<conio.h>
#include<string.h>
struct tnt
{
char name[20];
long phone:
};
void main()
{
fp=fopen ("J114.in", "r"):
n=0
while (fscanf(fp, &s %s”,a[n].name,a[n].capital)! = EOF)
n++;
for (;;)
{
printf("\n country name: ")
Scanf ("%s", st);
if (strempi (st, "End") =0)
break:
for (i=0; i<n; i++)
if (atrcmpi (a [1].name, st) ==0)
printf("Capital: $s", a[i]).capital);
}
}
#include<conio.h>
#include<string.h>
struct tnt
{
char name[20];
long phone:
};
void main()
{
fp=fopen ("J114.in", "r"):
n=0
while (fscanf(fp, &s %s”,a[n].name,a[n].capital)! = EOF)
n++;
for (;;)
{
printf("\n country name: ")
Scanf ("%s", st);
if (strempi (st, "End") =0)
break:
for (i=0; i<n; i++)
if (atrcmpi (a [1].name, st) ==0)
printf("Capital: $s", a[i]).capital);
}
}
No comments:
Post a Comment