Answer :
#include <iostream>
#include <string>
using namespace std;
void initializeArrays(string names[], int scores[], int size);
void sortData(string names[], int scores[], int size);
void displayData(const string names[], const int scores[], int size);
int main()
{
string names[5];
int scores[5];
initializeArrays(names, scores, 5);
sortData(names, scores, 5);
displayData(names, scores, 5);
return 0;
}
void initializeArrays(string names[], int scores[], int size){
for(int i=0; i<size; i++){
cout<<"Enter the name for score #"<<(i+1)<<": ";
cin >> names[i];
cout<<"Enter the score for score #"<<(i+1)<<": ";
cin >> scores[i];
}
}
void sortData(string names[], int scores[], int size){
int temp = 0;
string tempStr = "";
for(int i=0; i < size; i++){
for(int j=1; j < (size-i); j++){
if(scores[j-1]< scores[j]){
temp = scores[j-1];
scores[j-1] = scores[j];
scores[j]=temp;
tempStr = names[j-1];
names[j-1] = names[j];
names[j]=tempStr;
}
}
}
}
void displayData(const string names[], const int scores[], int size){
cout<<"Top Scorers:"<<endl;
for(int i=0; i<size; i++){
cout<<names[i]<<": "<<scores[i]<<endl;
}
}
C++ Programming :
C++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs. C++ is portable and can be used to develop applications that can be adapted to multiple platforms. Performance, effectiveness, and flexibility of usage were the design pillars of C++, which was created with systems programming, embedded, resource-constrained software, and big systems in mind. The software infrastructure and resource-constrained applications, such as desktop programmes, video games, servers, and performance-critical programmes, are two areas where C++ has been proven to be very useful.
C++ is standardized by an ISO working group known as JTC1/SC22/WG21. It has released six iterations of the C++ standard thus far and is now working on C++23, the upcoming revision. C++ was first standardised by the ISO working group in 1998 as ISO/IEC 14882:1998, also referred to as C++98. It released a revised version of the C++ standard in 2003 called ISO/IEC 14882:2003 that addressed issues found in C++98.
The two fundamental parts of the C++ programming language are a direct translation of hardware characteristics, mostly from the C subset, and zero-overhead abstractions built on top of those mappings. According to Stroustrup, C++ is ""C++" is a lightweight abstraction programming language that "offers both hardware access and abstraction" and is "built for creating and using efficient and elegant abstractions." Its ability to be done effectively sets it apart from other languages."
To learn more about C++ refer :
https://brainly.com/question/20339175
#SPJ4
C++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs. C++ is portable and can be used to develop applications that can be adapted to multiple platforms.
How to Create C++ Program for High score data for a fictious?
C++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs. C++ is portable and can be used to develop applications that can be adapted to multiple platforms. Performance, effectiveness, and flexibility of usage were the design pillars of C++, which was created with systems programming, embedded, resource-constrained software, and big systems in mind.
The software infrastructure and resource-constrained applications, such as desktop programmes, video games, servers, and performance-critical programmes, are two areas where C++ has been proven to be very useful.
#include <iostream>
#include <string>
using namespace std;
void initializeArrays(string names[], int scores[], int size);
void sortData(string names[], int scores[], int size);
void displayData(const string names[], const int scores[], int size);
int main()
{
string names[5];
int scores[5];
initializeArrays(names, scores, 5);
sortData(names, scores, 5);
displayData(names, scores, 5);
return 0;
}
void initializeArrays(string names[], int scores[], int size){
for(int i=0; i<size; i++){
cout<<"Enter the name for score #"<<(i+1)<<": ";
cin >> names[i];
cout<<"Enter the score for score #"<<(i+1)<<": ";
cin >> scores[i];
}
}
void sortData(string names[], int scores[], int size){
int temp = 0;
string tempStr = "";
for(int i=0; i < size; i++){
for(int j=1; j < (size-i); j++){
if(scores[j-1]< scores[j]){
temp = scores[j-1];
scores[j-1] = scores[j];
scores[j]=temp;
tempStr = names[j-1];
names[j-1] = names[j];
names[j]=tempStr;
}
}
}
}
void displayData(const string names[], const int scores[], int size){
cout<<"Top Scorers:"<<endl;
for(int i=0; i<size; i++){
cout<<names[i]<<": "<<scores[i]<<endl;
}
}
C++ is standardized by an ISO working group known as JTC1/SC22/WG21. It has released six iterations of the C++ standard thus far and is now working on C++23, the upcoming revision. C++ was first standardised by the ISO working group in 1998 as ISO/IEC 14882:1998, also referred to as C++98. It released a revised version of the C++ standard in 2003 called ISO/IEC 14882:2003 that addressed issues found in C++98.
The two fundamental parts of the C++ programming language are a direct translation of hardware characteristics, mostly from the C subset, and zero-overhead abstractions built on top of those mappings. According to Stroustrup, C++ is ""C++" is a lightweight abstraction programming language that "offers both hardware access and abstraction" and is "built for creating and using efficient and elegant abstractions." Its ability to be done effectively sets it apart from other languages."
To learn more about C++ refer to:
brainly.com/question/20339175
#SPJ4