Displaying a cue and square of a number through functions in C++
/***********************************************************************
* file: 3-14.cpp *
* desc: C++ assignment *
* Author: Syed R Fayyaz *
* Date: September 26, 2003 *
* *
* Comment: Homework assignment # 7 *
**********************************************************************/
//Assigning header files that will be used in this program.
#include
#include
#include
//Program began
int main()
{
//variable decleration section
intnw_pcqty,
mem_cardqty,
dsk_driveqty,
softqty;
double total,
nw_pc,
mem_card,
dsk_drive,
soft;
//constant section
const double NW_PCPRICE = 675.00,
MEM_CARDPRICE = 69.95,
DSK_DRIVEPRICE = 198.50,
SOFTPRICE = 34.98;
//Input section
cout
cout
cout
cout
cin >> nw_pcqty;
cout
cin >> mem_cardqty;
cout
cin >> dsk_driveqty;
cout
cin >> softqty;
//input closing section
cout
cout
cout
getch();
//calculation section
//NW-PC calculation
nw_pc = nw_pcqty * NW_PCPRICE ;
//Memory Card calculation
mem_card = mem_cardqty * MEM_CARDPRICE;
//Disk drive calculation
dsk_drive = dsk_driveqty * DSK_DRIVEPRICE;
//Software calculation
soft = softqty * SOFTPRICE;
//getting total
total = nw_pc + mem_card +dsk_drive + soft;
// Setting the flags
cout
//output section
clrscr();
cout
cout
cout
cout
cout
cout
cout
cout
return 0;
}
More Programming Languages
essays:
BASIC Programming Language Introduction - This is an explanatory report on what I've learned about BASIC (from a book) and may need improvements.
... different sections (called modules) of which will need to take care of desired actions for the problem. Basically, you are assigning actions (as in getting data, calculating, printing data, etc.) in the program to different modules (or sections). Also to mention ...
Report on Fortran as a programming language. Kreitzberg, C & Shnediderman, B. (1982). FORTRAN Programming. New York: Harcourt.
... such as addition, subtraction, multiplication, division, and exponentiation. The READ statement permits data values to be fed in, the arithmetic assignment statement permits the results of the computation to be displayed. The use of the GO TO statement permits the creation ...
A comprehensive look at the development of the computer programming language, focusing partially on C++.
Microsoft, Ebay, Intel - none of these companies could have been created if it weren't for the development of computer programming languages, especially the language of C++. The base of any computer program is the language that it was written with. There are several different computer languages ...
The creation of Tic-Tac-Toe game using the C/C++ language, includes full code of the actual program
... eye. This gives the program a more professional appearance. * Another enhancement we should have used is the incorporation of more header files. The only one we used was '#include ', other ones might have been the '#include ', however we will be trying ... itself could display things like, Wins, Losses, Draws, Winning streak, Winning percentage. For this we may have to use the header file '#include '. One of the biggest mistakes that we made was properly designing the structure of the program, often two ...
Being Popular.
A friend of mine once told an eminent operating systems expert that he wanted to design a really good programming language. The expert told him that it would be a waste of time, that programming languages don't become popular or unpopular based on their merits, and so no matter how good his ...
Compares and Contrasts JavaScript and Java
... collects information about a user without consent. This can be done by logging key strokes, recording Internet usages, and reading files on the infected computer. Spyware can create a number of undesirable effects including performance reductions, browser highjacking, popup advertising, and ...
Career of a Computer Programmer.
Computer Programmers design and create programs that allow the computer to fulfill specific tasks. The programs they create can be from things to help businesses to video games. A computer programmer may spend an hour working on a simple program, but on a highly advanced program may take a year. ...
Huffman Trucking Company: Database Management System - Request for Proposal: Description of Team Red Consulting, Inc.
... Technical Advisor: Frank Moody - Information Technology Manager: Alvin M. Timbol - Huffman Trucking Company's IT staff - Executive Assistant: To be assigned. Analysis of Huffman's Database Application Requirements Statement of Need. Smith Consulting developed entities and attributes for Fleet Truck ...