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
write a program to find the output 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1

Question: (i) What is multithreaded programming? Lists the benefits achieved by multithreading your code in a program. (ii) What type of coding should be eliminated when d

Example : Find the general solution to the subsequent differential equation. x 2 y′′ - 7 xy′ + 16 y= 0   Solution First the roots of (3)  r (r -1) - 7r + 16= 0 r 2

Tasks: Write a Perl script assignGrades.pl to assign letter grades to the students. Please use the classList2.txt file. Upon invoking, the script will access the file classL

find value of nCr using function

what is the c.

I do have an assignment in operating systems programming ... how can i attach my file?

In this question we will de ne a function for sorting lists based upon the algorithm selection sort. First, de ne a function smallest which takes as input a list of integers and r

how do I change a existing formula with a new formula and it show the result

Using OOP,write a sample program to get the factorial of a number entered by a user