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

Python, Software and sales assingment I keep get a syntax error

Software and sales assingment I keep get a syntax error

Java, wat is- m=5; n=3; x=m++-n+++m;

wat is- m=5; n=3; x=m++-n+++m;

NETLOGO , THERE IS ANY1 COULD HELP ME WITH NETLOGO WORK

THERE IS ANY1 COULD HELP ME WITH NETLOGO WORK

Visual Basic 2010 Karate Payments MDI Application, The following are requir...

The following are required for this lesson: Complete the Project "Adding New Payments," which is the Karate Payments that includes the Adding New Payments, Deleting Payments,

3-Tier Architecture in asp.net, I am getting error at business layer object...

I am getting error at business layer object in code behind page.

CMIS 102, Calculate the total price based on several key parts required to ...

Calculate the total price based on several key parts required to build a state-of-the-art gaming computer. The user will have the option of selecting different parts.

Selfcare project - strut frame work, Selfcare Project:   Technology U...

Selfcare Project:   Technology Used Strut Frame work, WAS 5.1, WPS 6.0, DB2, AJAX, Eclipse, Rational Application Developer 6 and  DB2 Selfcare is a big umbrella under whic

Create hijara game application, Assignment is to create hijara game on any ...

Assignment is to create hijara game on any plate form, you can use any plate form you like or easy to you. For instance let's say you can use visual studio, game studio (Prefer to

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