Hi hi, I'm writing a program that tests data we input then decides whether to proceed or stop with the program. This is a programming assignment that I've been working on for about a week, but I'm stuck on something :'(.
Basically, I have three functions that must proceed and check out as true before any calculations are done.
Is what I have so far, I've tried returning 1 as True and 0 as False, but I recieve a syntax error when trying to compile. I cannot use exit() or abort().Code:bool getBounds(int lowB, int uppB) { if (lowB >=-25) if (lowB <=-1) printf("\nLB works"); // This is where I want it to be known as TRUE else printf("\nLB doesnt work"); // This is where it is false else printf("\nLB doesnt work"); // This is where it is false if (uppB >=1) if (lowB <=25) printf("\nUB works"); // TRUE\ else printf("\nUB doesnt work"); // This is where it is false else printf("\nLB doesnt work"); // This is where it is false }
Does anyone have any possible tips that might point me in the right direction?
Can I just return either a 1 or a 0?
Thank you for any tips you can provide.
I read through the two stickies (including the homework) and I do not believe I am violating anything. If I am I will be more than happy to rewrite it.