CSC212 Class Example with Stacks

From dftwiki3
Revision as of 10:49, 7 October 2014 by Thiebaut (talk | contribs) (Created page with "--~~~~ ---- <br /> <tanbox> This program is a demo developed in class using Eclipse. The installation of Eclipse is covered in the beginning of [[CSC212 Lab 7 2014 | Lab #7]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut (talk) 11:49, 7 October 2014 (EDT)



This program is a demo developed in class using Eclipse. The installation of Eclipse is covered in the beginning of Lab #7.



Problem to Solve


Write a program that gets lines of text from a file. The name of the file is provided on the command line. The lines will typically be lines containing words and numbers. Below is an example:

Alpha 200 10
beta 30 20 50 zetta
gamma 5


Your program is to take all the numbers from the lines and print the lines with the numbers reversed. Below is an example of the output:

Alpha 5 50
beta 20 30 10 zetta
gamma 200



Solution Programs



...