Dictionary

#include<stdio.h>
#include<string.h>
int main()
{
    int i, count = 0;

    char ch[20];

    char anik[10][2][20] =
    {

        "Baum", "Tree",
        
        "Fahne", "Flag",
        
        "Tisch", "Table",
        
        "Stuhl", "Chair",
        
        "Essen", "To Eat",
        
        "Kopf", "Head",
        
        "Fernseher", "TV",
        
        "Sonning", "Sunny",
        
        "Schon", "Beautiful",
        
        "Schule", "School"
    };

    printf("Enter Any German Word : ");
    gets(ch);

    for(i=0; i<10; i++)
    {
        if(strcmp(ch,anik[i][0]) == 0)
        {
            printf("English Word : %s.\n", anik[i][1]);
        }
        else
        {
            count++;
        }
    }

    if(count == 10)
    {
        printf("%s not Found in this Dictionary.\n");
    }

    return 0;
}

Comments