Write a program to read the file, Programming Languages

Assignment Help:

Suppose you have a ?le orase of city and country names, like this:

Cluj, Romania
Debrecen, Hungary
Klagenfurt, Austria
Berlin, Germany
Szeged, Hungary
Budapest, Hungary
Lintz, Austria

Write a program towns.pl such that when it will read from the ?le orase will produce a sorted output with each country mentioned once, followed by an alphabetical list of the cities in that country:

Austria: Klagenfurt, Lintz.
Hungary: Budapest, Debrecen, Szeged.
Germany: Berlin.
Romania: Cluj.

Run your program against any other ?le (say, myfile) with structure similar to orase. Then execute your program against both ?les (orase and myfile) simultaneously.


Related Discussions:- Write a program to read the file

Need support in mobile app using angularjs and cordova, Need support in Mob...

Need support in Mobile app using AngularJS, Cordova (PhoneGap), Ionicframework We need an experienced front-end developer with a obsession for performance in mobile environment.

About oracle, do you solve questions of assigments?

do you solve questions of assigments?

Need help starting a project out, I''m doing a project for class in college...

I''m doing a project for class in college and im supposed to use today''s date and figure out how old i am in months, days, minutes, and seconds. My question is what is the beset

What is hiding a method? explain, Question 1 Explain the three traits of O...

Question 1 Explain the three traits of Object Oriented Programming Question 2 Write a note on (a) Assignment Operators                             b) Bitwise Operators.

What is an authentication subsystem, Question: (i) Each time a securit...

Question: (i) Each time a security mechanism is installed or deleted in a Digital UNIX system, SIA is involved. Draw a Security Integration Architecture diagram. (ii) How

String cost, A string S is said to be "Super ASCII", if it contains the cha...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Nature of the empirical data in pascal programming, You will soon receive i...

You will soon receive in an email a personalized assignment that tells you the nature of the "Empirical Data" you are to produce with a Pascal program for HW3. HW3 is about generat

Write a program to handle a book collection, Write a program to handle a bo...

Write a program to handle a book collection. The data on each book might be title, author, publication date, book number and  cataloging details. Allow for adding or deleting books

Get back data from database by user as search, i have a database having fie...

i have a database having field name title and comm. I want to search by name and get the all data remaining title and comm(comm is integer)

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd