+ 1
New code Iâm working on
Sequence of numbers in c++ I want to create a code with c++ to put a sequence of numbers In order were I can instruct the computer to store the values based on their values i. e. Min or Max.
4 Answers
+ 3
Show your effort first.
+ 1
Can you explain you'r qustion I didn't really get it. I could do what you want so you'll have an example
0
OK letâs say I have 11 numbers 2 12 21 23 24 34 43 55 35 33 38 39 and i want the code to give out five numbers in order, for example the first line to be 2 12 23 24 33 and the second line to be 2 12 23 24 55 and the third 2 12 33 39 43 and the to be 33 34 35 38 55 and the last line 34 35 38 39 43 if is wierd the example let me know.
0
So far I have this
#include <iostram>
#include <time.h>
using namespace std;
void choose(int a,int b,int c,int d[]);
void screen(inta[],int b);
int main(){
int play;
int number;
int price=plays*2;
int playernamber[]={}
choose(numbers,play,price,playernumber);
screen(playernumbe,plays);
}
void choose(int a,int b,int c,int d[]){
cout << "How many number? : ";
cin >> a;
cout << "How many play? : ";
cin >> b;
cout << "That will cost " <<c>> endl;
for(int i=1;<=5;1++){
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] << "j";
}
cout << end;
}
}