0

Algorithms #

working on this code for some time now need help with the algorithms part. #include <iostream> #include <time.h> using namespace std; void choose(int a,int b, int c,int d[]); void screen(int a[],intb); int main(){ int play; int numbers; int price=play*2; choose(numbers,play,price,playernumber); screen(playrnumbers,play);} void choose(int a,int b,itn c,int d[]){ cout << "How many numbres? : "; cin >>a; cout << "How many plays? :"; cin >>b; cout << "That will cost " <<c>> endl; for( int i=1;i<=5;i++){ cout << "Number" << i<< ":"; cin>> d[i]; } } void screen(int a[], int b){ for(int i=1;i<=5;i++){ cout << i; for(int j=0;j<5;j++){ cout <<"[" << a[j+1] << "]" } cout << endl; } }

4th Apr 2021, 2:19 AM
KYLE XY
KYLE XY  - avatar
1 Réponse
+ 2
Please, copy your code to the playground and post the link to your OP. Include a description of what the issue(s) is/are. Gives examples of expected inputs and outputs and a description of what the code is supposed to do. Following these simple steps will greatly increase the likelihood of receiving an answer in a timely manner. Also, keep this in mind for future posts. When you don't do these simple steps, it means that those who are trying to help you have to copy your code from here to somewhere where it can be ran (unless the issue is blatantly obvious with a small snippet) and then decipher your code to understand what you're trying to accomplish and assume that what we think must be what you want etc etc. FYI, There are too many syntax errors, formatting issues, logic problems etc to discern what it is that you want. You have variables that aren't initialized that you are using to try and initialize other variables and pass to functions etc.
4th Apr 2021, 2:32 AM
ChaoticDawg
ChaoticDawg - avatar