Hi, there's any way to shorten my code using making own functions?

Recommended Answers

All 4 Replies

I have no idea as I've not seen your code.

Might I say it is rather hard to shorten code more than it already is.

My code is about 150-200 lines, and my instructor said I can shorten the code using making own functions. She gave me an example that she can actually shorten the code for displaying printf in multiple times.

There are many thoughts about shortening code. There the academics where code must be "just so" and no more.
There is practical where the code met the spec (did the spec call out it must be 10 line long?)
There is long term maintenance where the code must be clear and readable over least number of lines.

I'd make a terrible or great student today.

Without seeing your code, there's not much to add or subtract.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.