Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include #define SIZE 2 0 int main ( ) { int compare ( char * s 1 , char * s 2 ) ; int

#include
#define SIZE 20
int main()
{
int compare(char *s1, char *s2);
int seq[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
char *city[SIZE]={"Long Prairie","New Prague","St.Vincent","New Ulm","Red Lake","Staples","Bow String","Detroit Lakes","Alexandria","Pipestone","Morris","Milaca","Evergreen","Rush City","Nisswa","Cottage Grove","Walker","Dumont","Granite Falls","Brandon"};
char *date[]={"1860-61","12/16/1860","12/28/1880","2/5-2/12/1881","2/6/17","9/3/17","12/23/28","1/28/39","2/15/50","9/28/64","7/9/75","3/5/79","4/16/79","5/14/79","7/26/79","4/24/81","9/27/82","6/4/93","2/9/94","4/29/11"};
float mag[]={5,4.7,3.6,3.5,3.8,4.3,3.8,4.3,3.8,3.5,3.6,3.4,1.1,0.1,1,3.6,2,4.1,3.1,3.12};
char key[20]="";
printf("\tName\t\tDate\t\tMagnitude\t
");
int i=0;
for (i =0; i < SIZE; i++){
printf("%d %s\t\t%s\t\t%.2f
",seq[i], city[i], date[i], mag[i]);
}
printf("Enter a city:");
scanf("%s",key);
int found =0;
for(i-0; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions