Why not just create two char arrays?
char a1[] = "Available";
char a2[] = "NotAvailable";
And have your condition just call the one thats needed?
And if your worried about the space just...
Type: Posts; User: strictlyC
Why not just create two char arrays?
char a1[] = "Available";
char a2[] = "NotAvailable";
And have your condition just call the one thats needed?
And if your worried about the space just...
if(isdigit(getchar())
{
}
else
{
}
perhaps something like that?
LOL, Two forums and he gets almost the same responce... I did write why it was doing it but it's so simple I edited in my first post. I'm still not going to say why cause it's so simple being pointed...
2 the number is even
924 is divisible by 2 since
924 is even.
3
The sum of the digits is divisible by three
924 is divisible by 3...
while (counter + n_started < 1025)
Have you been able to use allegro for anything else?
What I'm asking is Are you sure you installed it right?
If you have are you sure you set the compiler to find allegro where it suppose to be?
You can simply check them both at the same time.
if(i < 10 && c == '\0')
{
//if both are true then code gets executed
// if either one is false then no code
// between the { and }...
Well hope you at least addressed the problem of not being able to enter a even height
i.e 5 ft., 6 ft. Good luck.
#include <stdio.h>
void smile (void)
{
printf("Smile!");
}
int main (void)
{
for(int i = 6; i != 0; --i)
#include <stdio.h>
void smile(int i);
int main (void)
{
smile(6);
}
#include <stdio.h>
void smile(void); // Function prototype ; required if you put your functions
//after main
int main (void)
{
int count1;
int count2;
Just for fun:
printf("Your height is: %.0f feet and %d %s."
, (height/12)-.5
, (int)height-((((int) height)/12)*12)
, ((int)height-((((int) height)/12)*12)) != 1...
Well it would be better in my opinion. Also I would make it so they was a limit on max number of inches you could enter/ and max number of height (no ones over 8 foot are they? 8 foot 24 inches? How...
Your original post:
And again I will refer you to my responce
I guess I'll hit on what others didn't. You have to use a format specifier in the printf() statement to have it display the correct number of decimal places.
printf("%.3f", BMI); would produce a...
You should go to a notepad/ ide and play with all the source code you only read.
Start with around chapter 3 and do all examples in the books till the end. Then do all the exercises also.
You can't...