I see, the preview button. So um...how do I fix that minor problem in my code that will generate the output I desire?
that -4 shouldn't be there...that's my guess...but then again, I'm just...
Type: Posts; User: BB18
I see, the preview button. So um...how do I fix that minor problem in my code that will generate the output I desire?
that -4 shouldn't be there...that's my guess...but then again, I'm just...
The code you all provided was useful in determining the end result. However, the mistake of the triangle's actual apperance was MINE.
This is what it's supposed to look like:
*
***...
Are there even more convenient ways of freezing the program until the user responds by entering a key? Isn't fflush(stdin) really bad usage of C code?
Oh, that's true...that was just a bunch of b.s., but I wonder...
I hope it's not too much to ask for, but can someone point me to the right direction in how to deal with my PrintNSpaces function? ...
At times, compilers are very finicky about what can freeze a program until the user presses, say, Enter. A good alternative for you, which requires the use of the header file:
#include...
Arrays would be most convenient for you. Arrays and loops practically go hand in hand, also. Why, because you can affect every element in an array thanks to the sequential ability of a loop. The...
The last triangle looks different from the previous ones in that it's actually standing like a normal triangle should!
The user inputs the base (which has to be an odd integer) of the triangle.
...
I see that all of your assessments are pretty good. What I should have clarified was that either true or false would be returned to main().
I will test all of your suggestions and see which one...
If my two input values are equal, the program returns true...otherwise it returns false.
How in the world will the user know it is true or false if neither will appear on the screen? My boolean...
So, something like
if(endingtime>=2400)
{
endingtime=endingtime-2400;
}
So if I have that function and utilize pointers, I should be able to...change my day, month, and year values? Are my switch and boolean functions okay? I wouldn't want to change anything I don't...
Yeah, I guess it's fine. The only thing is, I want 0000 instead of 2400 when I add, say, 1600 and 800. It has to conform with military time. Oh, what I meant by "proper expression" was simply...
Perhaps I could make my program a lot more simpler by condensing it and using the time.h header file, but that's a path I'd like to stray from because my professor hasn't endorses the use of many...
My program's purpose is to add two time intervals (starting time and duration, respectively...these are the input values the user must enter) and display the result.
According to my professor,...
I have made the necessary touchups you pointed out. I'll try to see what my output is. Thank you!
What are you talking about? I stated clearly what the triangle should look like. If you read it, it says the number of stars increases by 2 as I reach the "height" or tip of the triangle.
The...
This new thread is practically a continuation of my last Triangle problem. The reason I posted this separately is just to ensure I can receive feedback right away.
Thanks! I understand...
Thanks! I understand perfectly.
Now, I have to create a triangle that displays like this, in this case, when the height is 11:
*
***
*****
*******
*********
***********
Ehehe, minor HTML mistake there.
I am trying to generate a triangle using "height" as input. The triangle should look like this:
*
**
***
**
*
where the height is 3, for 3 asterisks. However, the input can be any integer...
Thank you, I might just be able to fix this project with that.
My project's intent is for the user to input a positive integer value, and compute the following loops: If the input number is even, halve that value; if instead it is odd, then multiply it by 3 and...