Write a program to read the file, Programming Languages

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.

Posted Date: 3/12/2013 1:44:44 AM | Location : United States







Related Discussions:- Write a program to read the file, Assignment Help, Ask Question on Write a program to read the file, Get Answer, Expert's Help, Write a program to read the file Discussions

Write discussion on Write a program to read the file
Your posts are moderated
Related Questions
Hi I have an assignment for prolog languagle is it possible to get help

Write a program to draw the truck following figure. The program should buttons to provide When the truck runs left wheels must rotate in the correct direction. Rotating whe

Explain the Comma Operator- Computer Programming? The comma has two utilization and the most common use is as a parameter separator for data types and function parameter lists. H

Python Programming hmw help!! Write a program that ask the user to input the followings: number of shares, stock price, and broker commission. Last month jim purchased some stock

This section is proposed to be a catch all for several of the fundamental concepts which are used occasionally in working with systems of differential equations. There will not be

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

Implement the Prim's algorithm with array data structure as described in slide 12 of the file 04mst.ppt. Your program should have a runtime complexity of O(n2) and should be as eff

Matlab Assignment # For each of the three datasets (data1.txt, data2.txt, and data3.txt in bnhw2q2.zip), cluster the data using k-means in Matlab, with k=2, 3, 4 and 5 using the pr

Expertsmind.com is expert in java assignment help JAVA Virtual Machine A Java exclusive device or java virtual machine (JVM) is an exclusive device able of undertaking Jav

WRITE A FORTRAN PROGRAMME TO GENERATE PRIME NUMBERS BETWEEN 1 AND 100.