1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
earnstyle [38]
1 year ago
11

How to display the name and address of customer from cuseast table through descending order using their id in

Computers and Technology
1 answer:
Vesna [10]1 year ago
5 0

Answer:

to show the records in descending order used desk keyword

You might be interested in
Write a program to read as many test scores as the user wants from the keyboard (assuming at most 50 scores). Print the scores i
Oksana_A [137]

Answer: Provided in the explanation segment

Explanation:

Below is the code to carry out this program;

/* C++ program helps prompts user to enter the size of the array. To display the array elements, sorts the data from highest to lowest, print the lowest, highest and average value. */

//main.cpp

//include header files

#include<iostream>

#include<iomanip>

using namespace std;

//function prototypes

void displayArray(int arr[], int size);

void selectionSort(int arr[], int size);

int findMax(int arr[], int size);

int findMin(int arr[], int size);

double findAvg(int arr[], int size) ;

//main function

int main()

{

  const int max=50;

  int size;

  int data[max];

  cout<<"Enter # of scores :";

  //Read size

  cin>>size;

  /*Read user data values from user*/

  for(int index=0;index<size;index++)

  {

      cout<<"Score ["<<(index+1)<<"]: ";

      cin>>data[index];

  }

  cout<<"(1) original order"<<endl;

  displayArray(data,size);

  cout<<"(2) sorted from high to low"<<endl;

  selectionSort(data,size);

  displayArray(data,size);

  cout<<"(3) Highest score : ";

  cout<<findMax(data,size)<<endl;

  cout<<"(4) Lowest score : ";

  cout<<findMin(data,size)<<endl;

  cout<<"(5) Lowest scoreAverage score : ";

  cout<<findAvg(data,size)<<endl;

  //pause program on console output

  system("pause");

  return 0;

}

 

/*Function findAvg that takes array and size and returns the average of the array.*/

double findAvg(int arr[], int size)

{

  double total=0;

  for(int index=0;index<size;index++)

  {

      total=total+arr[index];

  }

  return total/size;

}

/*Function that sorts the array from high to low order*/

void selectionSort(int arr[], int size)

{

  int n = size;

  for (int i = 0; i < n-1; i++)

  {

      int minIndex = i;

      for (int j = i+1; j < n; j++)

          if (arr[j] > arr[minIndex])

              minIndex = j;

      int temp = arr[minIndex];

      arr[minIndex] = arr[i];

      arr[i] = temp;

  }

}

/*Function that display the array values */

void displayArray(int arr[], int size)

{

  for(int index=0;index<size;index++)

  {

      cout<<setw(4)<<arr[index];

  }

  cout<<endl;

}

/*Function that finds the maximum array elements */

int findMax(int arr[], int size)

{

  int max=arr[0];

  for(int index=1;index<size;index++)

      if(arr[index]>max)

          max=arr[index];

  return max;

}

/*Function that finds the minimum array elements */

int findMin(int arr[], int size)

{

  int min=arr[0];

  for(int index=1;index<size;index++)

      if(arr[index]<min)

          min=arr[index];

  return min;

}

cheers i hope this help!!!

8 0
3 years ago
What's the risk or effect of software piracy?
slamgirl [31]
You can go to jail get in alot of trouble plus you always have a chance of letting a virus into yoru computer
7 0
3 years ago
Read 2 more answers
What is the decimal value for the jump control?
Scorpion4ik [409]

Answer:

Is there suppose to be a pic?

Explanation:

7 0
2 years ago
Which symbol is used for an assignment statement in a flowchart?
Pavlova-9 [17]

Equal symbol

equal symbol

Within most programming languages the symbol used for assignment is the equal symbol.

4 0
2 years ago
Hey friends,<br><br> What is a IT form?<br><br> thanks
ziro4ka [17]

Hi buddy, an IT form is for people who are applying at a TECH college.

Love u <3

Hope this helps

8 0
3 years ago
Other questions:
  • In the ascii coding scheme, each byte represents a single ____________________, which can be a number, letter, blank space, punc
    9·1 answer
  • Make a program that (i) asks the user for a temperature in Fahrenheit degrees and reads the number; (ii) computes the correspond
    8·1 answer
  • Which of these expressions evaluates to 4.0?
    12·2 answers
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • The Status bar is used to control the majority of the drafting settings in AutoCAD
    13·1 answer
  • _____ are independent and not associated with the marketing efforts of any particular company or brand.​
    9·1 answer
  • Click on the _____ tab on the ribbon to open the backstage view.
    7·1 answer
  • Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
    7·1 answer
  • Assessment
    12·1 answer
  • The higher the ____________________, the faster the ____________________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!