No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
- Interests
- Japanese,VideoGames,Japanese Video Games
Im having problems creating a function that checks how many times a number shows up in the array The array is already sorted im trying to loop through the array and theres be a counter to keep track of the number of times it appears and then a second array … |
|
I want to add numbers to an array using scanf What did i do wrong? it says expected an expression on the first { in front of i inside the scanf... void addScores(int a[],int *counter){ int i=0; printf("please enter your score.."); scanf_s("%i", a[*c] = {i}); }//end add scores |
|
Ive spent almost 4 hours messing with this code trying to figure out whats wrong...to no avail. I keep getting zero as the total in the displayTripCost function at the bottom, i dont know if i messed up the pointers or what when i called by reference.... Please help!!! //Toni-Ann … |
|
Cant figure out whats wrong with this function but i think its probably a data type error. Please help! void displayName(){ char name[30]; int number, x; printf("So..what is your name?\n"); scanf_s("%s",&name); printf("Nice to meet you %s, how many times would you like to be cloned?\n",name); scanf_s("%i", &number); for(x=0; x<number; x++){ … |
|
the input is [120, [10, 20, 30]] i split the balance using this code def checkio(data): balance=[int(x) for x in data[0:1]] withdrawal=data[1:2] but when i split it the withdrawal section looks like [[10,20,30]] which hinders the loops im going to do. I want it to have single brackets like so: … |
|
well first of all i cant figure out how to move the first letter to the end but before i fix that i need help figuring out why the else branch is being totally ignored. even when the conditions are met for else It still gives me the result in … |