//start of function main (it is void so it doesn't return value)
With the added bonus of violating the C++ standard and failing to compile on compilers that meet the standard :)
Don't think that just because you stated void nothing is returned nothing is returned to the OS. Also don't assume that something else that might be relying on code returning an int will be happy with it not doing so.
You have planks with equal length and you need to chop from these planks pieces with same
length. The task is to develop a C++ program using linear algorithm that asks the user to input
the length of planks, length of pieces and number of pieces. The program needs to calculate and
display the number of planks that we need to produces the requested amount of pieces.
This is a home assignment, please help me!
and then
I need to calculate and display the number of planks needed to produce the requested amount of pieces in the problem above. But I should use only a linear algorithm not a branched one
lol OP: Solved Athar: What's the question? OP: a Nisheeth: What, I guess, Athar meant was that, what is your question? OP: a Athar: Well, how about posting your "branched" solution OP: a Athar: Right, add code tags: OP: a Athar: It's still hard to read with that kind of indentation, but alright...