Purchase Solution

C program to compute profit in stocks

Not what you're looking for?

Ask Custom Question

Please assist with the following C program.

Six stock prices (buying price) are stored into a 2 x 6 two-dimensional array. The user inputs the current price of each stock. This program will compare the buying price and the current price of each stock. It will print a table like following:

Stock Buying Price Current Price Profit If Sold
1 12.25 15.00 2.75

After the table is displayed, print out the stock with the highest profit if sold and its position in the array[row][column].

Purchase this Solution

Solution Summary

Attached implementation (419989.c) reads the buying and current prices of stocks from user in two separate loops, however it has comment that tells you what to do if you do not want to read buying prices from user. Implementation also introduces you to the usage of macro.

Solution Preview

Attached implementation (419989.c) reads the buying and current prices of stocks from user in two separate loops, however it has comment that tells you what ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

C# variables and classes

This quiz contains questions about C# classes and variables.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.