Can someone help me please with is problem C++ Code: Write the definition of a function signOf , that receives an integer parameter and returns a -1 if the parameter is negative, returns 0 if the parameter is 0 and returns 1 if the parameter is positive. So, if the parameter's value is 7 or 803 or 141 the function returns 1. But if the parameter's value is -22 or -57, the function returns -1. And if the parameter's value is 0, the function returns 0.

This looks very very basic and what's the problem you find in solving it? You need to have a 'switch case' or multiple 'if' conditions to solve it.

Try this.. hope you know how to call a function & compile it. PHP: int signOf(int input){ if(input < 0) return -1; else if(input == 0) return 0; else return 1;}

'else' is for every other number which is not negative or equals zero, so for any positive number the code inside else be executed.

Write the definition of a function named quadratic that receives three double parameters a , b , c . If the value of a is 0 then the function prints the message "no solution for a=0" and returns. If the value of "b squared" - 4ac is negative, then the code prints out the message "no real solutions" and returns. Otherwise the function prints out the largest solution to the quadratic equation. The formula for the solutions to this equation can be found here: Quadratic Equation on Wikipedia.

So, someone was kind enough to do your homework and your first though was "sweet, let's post some more"? Is this how you deal with IM as well? Unless you give the effort and dedication to increase your knowledge, your business future will be the same as your programing skills - pathetic. Stop partying and shit - get to work.

First avowal as a moderator it would be nice if you could show some respect. I wasn't partying and I only had 1 more question. If I was partying, I wouldn't be on this forum using my resources to get help.

Seems like the partying line hit a nerve there. Oh - and you need to check your auto-speller - it changed a misspelled "of all" to "avowal". Moderation status has nothing to do with this. I neither locked the thread nor deleted your post or anything else. I am still entitled to my opinion and my opinion (in case it 's not clear yet) is that begging for homework solutions instead of taking the chance to actually increase your skill set is pathetic. Edit: You can keep minus repping me whenever you can. It will not make you a programmer but if it makes you sleep better, it 's fine by me

Check the dictionary. Avowal is definitely a word and I used it in its right context. And I'm not BEGGING for my homework solutions. I've actually attempted the problem, but I'm trying to see where I went wrong. If I was begging, I would've posted all of the questions and simply said help me do these. And no, the partying line didn't hit a nerve there...it was actually the cursing. Chill on me

Why didn't you post your attempt then? Anyways. Since you're not interested into programming but have the course for some weird reason, just pay someone on fiverr to do it.

Indeed you are correct, I erred about its syntactical use. I apologize for that, I should have checked. Had you post your non-working code and asked what 's wrong with that would make it believable.

Assume that two int constants, FIRST_YEAR and LAST_YEAR have already been declared and initialized with year values (like 2009, 2014), along with a double variable oil that has been initialized with the number of barrels of oil consumed in Canada in the year given by FIRST_YEAR . Write some code that uses a while statement to print on a line by itself, each of the years from FIRST_YEAR to LAST_YEAR inclusive. On each line, after the year, separated by a colon and a space, print the new value amount of oil , taking into account that each year the oil consumed increases by 20%. This is what I have and it's wrong Code: while ((FIRST_YEAR <= LAST_YEAR)) { cout << FIRST_YEAR << ":" <<" "<< oil endl; oil=((oil*20) / 100 ); FIRST_YEAR++; } Help please!