OMG thank you so much. I finally got it working perfectly. I always forget little things that really mess me up. Again thanks for the help I probably wouldn't have gotten it without you.
Type: Posts; User: thomasjiii
OMG thank you so much. I finally got it working perfectly. I always forget little things that really mess me up. Again thanks for the help I probably wouldn't have gotten it without you.
Yea here's the complete code:
#include <stdio.h>
int main(void)
{
int a, b, num, onesDig, tensDig;
Yea I fixed both of them after the two if statements, but now I cant get output from anything but the onesDig. It outputs stuff like -eight, -two. A couple times it was actually right for the ones...
rags_to_riches I saw that. That is what was causing the else error, but I have fixed that part now.
I fixed the else problem and dropped the else before the if (onesDig) but I don't know why the output seems to be just a random onesDig case; the program will not output ten-nineteen or twenty-ninety...
I really have problems with switch statements for some reason. I put them inside the ifs and it keeps giving me errors saying else statement without a previous if. I tried just taking the else's out...
Ok thanks for the help I should be able to get it now.
I've gotten completely lost lol. I'm not really sure how to use your codes from post 2 and 3.
I'm taking my first c programming class so I don't know much about it. I wasn't really sure how and where i should use the code you posted. I put the printf at the end of the code. So would I put the...
I tried printf("%s", word); and it doesn't print anything. I tried printf(word); and put in 10 and 11 and it displayed -four
Thanks so far. I'm still confused on how to get it to print out the words. This is what i have now:
#include <stdio.h>
int main(void)
{
int a, b, i, onesDig, tensDig;
char* word;
I am making a program that will take any two two-digit numbers determine the largest and display it in words using if/else and switch statements. I'm kinda stuck. I know how to determine the larger...