0
i am getting error anyone can help
#include <stdio.h> #include <stdio.h> int main () { char dictionary [10] [2][15]={ "Baum", "Tree", "Fahne", "Flag", "Tisch", "Table", "Stuhl" "Chair", "Essen", "To Eat", "Kopf", "Head", "Fernseher", "TV", "Sonnig", "Sunny", "Schon", "Beautiful", "Schule", "School", } char german[15]; printf ("Enter a german word :") ; gets (german); int i, c=0; for (i = 0; i < 10;i++) { if(strcmp (german, dictionary[i] [0])==0) { printf("English - %s\n",dictionary [i] [1]); } else c++; } if (c==10) printf("Not in Dictionary. !"); return 0; }
5 Antworten
+ 1
Muhudin M Alasow ✌️  you should 
include string.h as you're using strcmp,
a comma between "Stuhl" and "Chair"
a semicolon after the dictionary declaration
0
Hei
0
// C program to find a pair with the given difference 
#include <stdio.h> 
// The function assumes that the array is sorted 
bool findPair(int arr[], int size, int n) 
{ 
	// Initialize positions of two elements 
	int i = 0; 
	int j = 1; 
	// Search for a pair 
	while (i<size && j<size) 
	{ 
		if (i != j && arr[j]-arr[i] == n) 
		{ 
			printf("Pair Found: (%d, %d)", arr[i], arr[j]); 
			return true; 
		} 
		else if (arr[j]-arr[i] < n) 
			j++; 
		else
			i++; 
	} 
	printf("No such pair"); 
	return false; 
} 
// Driver program to test above function 
int main() 
{ 
	int arr[] = {1, 8, 30, 40, 100}; 
	int size = sizeof(arr)/sizeof(arr[0]); 
	int n = 60; 
	findPair(arr, size, n); 
	return 0; 
}
0
I am just a beginner
0
If you please check it



