Nobody is spoon feeding me. I'm just learning to code better. Thats why I asked for constructive criticism. Thanks Doilin
#include <stdio.h>
#include <stdlib.h>
int num1;
int num2;
Type: Posts; User: anonymoususer
Nobody is spoon feeding me. I'm just learning to code better. Thats why I asked for constructive criticism. Thanks Doilin
#include <stdio.h>
#include <stdlib.h>
int num1;
int num2;
Can I get some constructive criticism on why my program doesnt calculate properly?
#include <stdlib.h>
#include <stdio.h>
int main(){
int sum;
Okay I see what your trying to say and it makes sense but it doesnt make sense if I wanted to compare a string in the array like scissors to rock.
I would thought it would be like if...
I added a line of code that isnt being executed and I don't know why. Its Rock Paper Scissors. I have it set up so that if both players throw rock then it should say tie game but it won't appear
its...
I do have one other problem. Im trying to put my code in a function but I'm getting errors
#include <stdlib.h>
#include <time.h>
char array[3][20] = {"Rock", "Paper", "Scissors"};
I got it working thanks!!
I'm not at my computer at the moment so I can't test it but are you saying I shouldnt use char for the array? I don't think you can say "string array" what should it be if that's what your referring...
You must of read it before I redited post #5 because i'm not assigning it to an array its being assigned to randNum and then Im passing randNum through the array. And the program stops running after...
Ok
I changed it based on what you said and I have the following errors
#include <stdlib.h>
#include <time.h>
int main(){
char array [3] = {"Rock", "Paper", "Scissors"};
Im thinking of adding more options. Case 1 is what I what you to look at.
I'm trying to create a rock paper scissors game and I having problems having one of the strings of array to appear.
Any help is appreciated. When you hit option 2 it should atleast printf the word...
I'm made a textbased game and I'm having trouble reading from a file.
the text file reads john so after you enter your name in game it should say welcome john no welcome (your name)
the function...
If I had 6 Words and I want the user to randomly receive one of the 6 words every time they entered 1 how would I write that?
I did what you said anduril but the text is not alligning properly in my case 2 statement.(leaguestandings function)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>...
What is a more stable version of \t that will let me indent lines of code without going all over the place. I need everything line up evenly.
Thanks that did it
I'm not sure why I'm getting the error storage size of p is not known. Cant i write it like p.homeTeam; like in the code below and have the user enter in the information like a regular variable(int...
Thanks alot! that fixed it
Thanks that was helpful but when I set my code up like this I get "welcome to my program" and "welcome spencer".
Its only supposed to say welcome to my program
int main (){
char name[30];...
I've taken into account what you said and it works better now but when I enter spencer it says welcome spencer. (its supposed to say welcome to my program spencer)
int main (){
char name[30];...
How do I do this properly?
I want it to printf a separte statement if a certain name is entered. (spencer)
int main (){
char name[30];
printf("\nTo get started, Enter your name!\n");
...