The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 305 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
C++ Programming in LinuxÂ
Â
Program Objective:
Â
1. This program is intended to get acquainted with Linux (or refresh programming experience). This will be a short interactive program that will get me started an editor in Linux (pico, vi, emacs, etc.).
Â
2. It will get me through compiling, linking, and running a program. You will write the program in C++
Â
Â
Editing: Program in Linux, use the editors in the Linux environment . Use the pico editor. Also available are vi and emacs editors.
Â
Compiling: The compiler is g++. This can be used from the command prompt. Sample compilation is
Â
C++ program: g++ -o test test.cpp          (source program is test.cpp)
Â
Executing: Here, test is the executable file name, and the execution is as follows.
C++ program:Â . /test
Â
Program Description:
Â
I am trying to make a small Linux program that will calculate the average of the following five grades: 77, 85, 80, 94, and 97. The program does not have to accept these grades, they may be hard coded into the program.
Â
You must compute the average as a separate function such as average(sum, numGrades).
Â
The program should print out the average, and then terminate.
Â
Program requirements:
Â
Enough documentation (either embedded in the code with comments, or external) to explain how you parsed the program and to follow what you expect to happen. Source code for your program file name linuxfc.cpp.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly