- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Dear all, I have this code and this data...but i want to sort the sum1 in descending order..but my problem is..i want to sort many array....like this.. after sort 3: ............. 46 1: .............. 25 2:..................20 how to sort in descending order together with the row? 1: 5 6 7 … |
|
I have x and y array...After I have sort y, it succefully sort the y. but for x, there is some number that are not sort like this [B][U]x y[/U][/B]30 1 45 1 46 1 15 1 I want the x sorting also...like this [B][U]x y[/U][/B]30 1 15 1 30 … |
|
this is the sample program of selection sort, which is given the value. But, how to call the value from read file? anybody knows? [ICODE] #include <iostream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i,j,min,minat; for(i=0;i<n;i++) { minat=i; min=y[i]; for(j=i+1;j<(n);j++) //select the min of the rest … |
|
Why the selection sort output not appear? Anybody knows how to correct it? [CODE=C++] #include < iostream > #include < string > #include < cmath > #include < iomanip > #include < fstream > using namespace std; void SelectionSort ( int *y , int n )//selection sort function { int … |
|
After read this file , i want to do a selection sort...below are the selection sort programming that i get from google [CODE=C++] #include <fstream> #include <string> #include <iomanip> #include <iostream> using namespace std; void sortData( string fId[], int noOfRows); int main () { string Id[100]; int total[100], i = … |
|
why the output do not produce the output after sorting....anybody knows how to do a selection sort code? [code=C++] #include <iostream> #include <string> #include <cmath> #include <iomanip> #include <fstream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i, min,minat ; { for(i=0;i<3;i++) { minat=i; min=y[i]; if(min<y[i]) { … |
|
I have this data, but when i sort it different from what i want. I want to sort in descending order like this 2 30 1 20 3 15 [U][B]jest.txt[/B][/U] 1 20 2 30 3 15 [U][B]after compile[/B][/U] 1 15 30 15 15 15 [code=C++] #include <fstream> #include <string> #include … |
|
How to do a selection sort? Which I want to sort in descending order this data 1 50 2 90 3 40 |
|
How to declare the array and read the array? Must I use data structure? [U]Two array[/U] 1 30 2 20 3 10 4 50 5 15 |
|
How to change this data sturucture from vector <int> total; to float total;? because if I change it to float teher is many error.... [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import … |
|
i have this data..but how to sort the data in descending order together with the examid? [U]examid total[/U] 1: 25 2: 20 3: 46 4: 56 5: 12 6: 22 7: 20 8: 18 |
|
what is the =' : left operand must be l-value means? error C2106: '=' : left operand must be l-value [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import "std" namespace into global … |
|
Can anybody help me whis this error? in red colour... error C2109: subscript requires array or pointer type error C2109: subscript requires array or pointer type : error C2109: subscript requires array or pointer type error C2664: 'void __cdecl std::swap(int &,int &)' : cannot convert parameter 1 from 'int' to … |
|
I have this programming but I want to sort the total in descending order... How to make an examid together with total after has sort the output? [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace … |
|
If i have 2 array contains data 1 50 2 30 3 40 4 70 if I want to sort in descending order which take nombor and data together... 4 70 1 50 3 40 2 30 How??? |
|
I have this data..but something error..my data is like this... Exam TExam 1 25 2 20 3 46 4 56 5 12 but it only appear like this 1: -853617 [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for … |
|
If I want to sort in descending order for exams.at (i).total.at(j) like this.. the output 1 34 2 56 3 21 and I want to cout the output 2 56 1 34 3 21 Is it must to use bubble sort or radix sort? [code=c++] #include <iostream> // std::cout #include … |
|
AYBODY KNOWS WHY THIS PROGRAM IS ABNORMAL? [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import "std" namespace into global namespace struct exam { string examid; vector <int> total; }; int myfile; int … |
|
[B]exam TStu TExam [/B] 1 91 25 2 168 20 3 2080 46 4 680 56 5 15 12 6 680 22 7 166 20 How to sort in descending order like this.. 4 680 56 3 2080 46 1 91 25 .................................... |
|
I have this to file.First [B][U]ayam.txt[/U][/B] 10 20 30 60 90 50 40 [U][B]and itik.txt[/B][/U] a b c d e f g h i How to call read and write the ayam.txt and itik.txt into one file. which first i would like to cout the ayam.txt and then itik.txt. |
|
I have this data 1 2 3 4 5 6 7 8 9 10 0 1 0 9 0 0 5 0 0 3 How to count rowwhich have value only? Which the answers is only 4 column which have value? something like this I do. [code=C++] a[i]=total; total=a[i]+temp; myfile<<"\t"<<total<<setw(5); … |
|
I cannot compile my programming..abnormal programming..anybody whi knows where is my mistake? [code=C++] { int count, k; { count=0; myfile<<"i,j|"; for ( int i = 1 ; i < students.size (); i++ ) for ( int k = 1;k<students.at(i).examcode.size(); k++ ) { count=0; for (int colHead = 1; colHead <students.at … |
|
How to count> Is true I do this programming? [code=C++] { int count; count=0; count++; for ( int i = 0 ; i < students.size (); i++ ) { for ( int k = 0;k<students.at(i).examcode.size(); k++ ) { if (students.at (i).examcode.at(0)=0) { cout<<count++<< " "; } } } } [/code] |
|
How to count how many (3, 10 appears in data? I have done a little bit programming but abnormal program. (3 , 10) (3 , 31) (3 , 51) (3 , 71) (3 , 78) (3 , 97) (3 , 105) (3 , 113) (3 , 135) (3 , 138) … |
|
File is successfully opened 3 13 34 54 71 81 97 105 116 135 138 I have this data, and I want to call (3,1) then (3,13), then (3,34).......... How to declare 3 is the first than 13 is second? [code=C++] { ifstream stream1 ("STA83STU.txt"); if ( !stream1 ) { … |
|
How to make a pair programming.. like I have 1 2 3 4 5 6 7 First, I want to make a pair of 91,20 (1,3) (1,4) (1,5) using i=1, i<9,i++ |
|
I have this data ROW 1: 3 15 36 56 71 83 97 106 118 135 138 ROW 2: 3 10 31 51 71 78 97 105 113 135 138 How to count when 3 meet 15 is 1 3 meet 36 is 1 3 56 is 1 3 meet … |
|
Dear all, I have one problem,..I want to count how many examcode and fill in the blank in the matrix below that I have done. Example is ,, for examcode 1 how many it appear. and for examcode 2 and examcode 1, how many student take both of them?? [code=C++] … |
|
How to correct it , at line 84. Error executing cl.exe. error C2447: missing function header (old-style formal list?) [code=C++] /*--------------------------- Filename : ConflictMatrix.cpp ---------------------------*/ #include <iostream> #include <fstream> #include <iomanip> #include <string> #include <vector> using namespace std; struct student { string studentid; vector <int> examcode; }; int main() { … |