Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that creates two arrays that each hold 5 pieces of data: one tha

ID: 3533595 • Letter: W

Question

Write a program that creates two arrays that each hold 5 pieces of data: one that will hold an invoice number (a number between 0 and 20000) and one that will hold the amount of the invoice. Using a loop, load the arrays by asking the user to enter the invoice number (test for validity) and the amount of the invoice. Send these arrays to a function called find(), that asks the user to enter an invoice number and you print out the amount of the invoice. If the invoice is not found, print an error message. Put this in a loop so the user may run again.

Explanation / Answer

void main()

{

float array1[5],array2[5],num;

int i;

for(i=0;i<10;i++)

{

cout<<"enter value";

cin>>num;

if(num<0&&num>2000)

array1[i]=num;

else

array2[i]=num;

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote