小编Jer*_*emy的帖子

C++意外的数组输出

//Page 215, #2, by Jeremy Mill
//program taken in 7 values, displays them, and then sorts them from highest to     lowest, and displays them in order.

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
//Define the variable we will need  
const int arraySize = 6;
double dailySales[arraySize];

//Now let's prompt the user for their input
for (int a=0 ; a <= arraySize; a++ )
    {
    cout << "Please enter sale number " << a+1 << " :";
    cin …
Run Code Online (Sandbox Code Playgroud)

c++ arrays sorting

3
推荐指数
1
解决办法
417
查看次数

标签 统计

arrays ×1

c++ ×1

sorting ×1