CS 1044 Intro. Programming in C, Spring 1999


Example Programs from Spring 99

  • Party Music Program using struct variables. Note:  the documentation of this program is absolutely pathetic!


  • Example Programs from Fall 98

    1. Simple Calculator: Illustrates functions, parsing, enumerated type use.

    2.  
    3. Simple Complex Number Arithmetic: Illustrates use of struct type variables and functions.

    4.  

    Example Programs from Previous Semesters

    1. fileio.cpp: simple file I/O with EOF-loop

    2.  

       
       
       

    3. invoice.cpp: line-by-line data processing with summary
    4. order.dat: input file for invoice.cpp

    5.  

       
       
       

    6. invoice.out: output file for invoice.cpp

    7.  

       
       
       

    8. comiss.cpp: switch, if..else, line-by-line, summary
    9. sales.dat: input file for commiss.cpp

    10.  

       
       
       

    11. comm.dat: output file for commiss.cpp

    12.  

       
       
       

    13. reverser.cpp: reversing a list with arrays

    14.  

       
       
       

    15. bincalc.cpp: a binary calculator

    16.  

       
       
       

    17. dater.cpp: converting date formats

    18.  

       
       
       

    19. dates.dat: input file for dater.cpp

    20.  

       
       
       

    21. dates.out: output file for dater.cpp

    22.  

       
       
       

    23. espn.cpp: organizing data

    24.  

       
       
       

    25. ingames.dat: input file for espn.cpp

    26.  

       
       
       

    27. where.dat: input file for espn.cpp

    28.  

       
       
       

    29. schedule.out: output file for espn.cpp

    30.  

       
       
       

    The Infamous Payroll Example Programs (available after Project 1 is due)

  • FuncPay.cpp: function-based version of Payroll Program

  •  

     
     
     

  • ArrayPay.cpp: Payroll Program with arrays

  •  

     
     
     

  • StructPay.cpp: Payroll Program with an array of structs

  •  

     
     
     

  • NamesPay.cpp: Payroll Program with employee names (C-style strings)

  •  

     
     
     

  • NamesPay.cpp: Payroll Program with employee names (C++ string objects)

  •  

     


    Send comments and inquiries to:
    mcquain@cs.vt.edu
    Last updated Monday, April 19 1999