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
forsale [732]
3 years ago
11

Write a program to accept 10 different whole number from the user and store them in a

Computers and Technology
1 answer:
Harman [31]3 years ago
8 0

Explanation:

Question is not well presented:

The search strings in the question are not well formatted.

First thing, I'll arrange the account number in order of 7;

Meaning that the length of each account number is 7

8149420 5333174 3080098 6755963 9526981 4449539 9387197 5104726 2931356 4282637 1750219 6086650 3164838 2419590 4578589 9718904 674994 12545408

Answer:

// This program is written in C++ Programming Language

// Comments are used for explanatory purpose

// Program starts here

#include <iostream>

using namespace std;

// Initialise Function

int ArrayList(int[], int, int);

// Main Method starts at

int main()

{

// The list of account is 18; so, we Initialise an integer Variable to hold this value

const int acctlist = 18;

// Initialise an array to hold the account numbers

int List[acctlist] = { 8149420 5333174 3080098 6755963 9526981 4449539 9387197 5104726 2931356 4282637 1750219 6086650 3164838 2419590 4578589 9718904 674994 12545408

};

// Declare account number and search result Variables of type integer

int accountnumber, Result;

// Prompt user for account number

cout << "Enter a valid account number: ";

cin >> accountnumber;

// Determine if valid or not

Result = ArrayList(List, acctlist, accountnumber);

if(Result == -1){

cout << "Account number " << AcctNum << " is invalid.\n";}

else{

cout << "Account number " << List[Result] << " is valid\n";

}

return 0;

}

// Function starts here

int ArrayList(int list[], int size, int value)

{

int index = 0,

pos = -1;

bool seen = false;

// Check if Account number is seen in list

while (!seen && index < size)

{

if (list[index] == value)

{

seen = true;

}

pos = index;

}

index++

You might be interested in
Do Y’all know how to view your answers to others people questions on your profile? Please answer fast
Pavlova-9 [17]

:Answer:first: <em>click on your profile you should see a little head after</em>, scroll all the way down u should see a <em>view proflie</em>-click on it after, u shoud see a <em>questions asked and questions answered</em>

<h2><em>hope this helped!!</em></h2>

Explanation:

5 0
3 years ago
What date does GTA 6 come out<br> A. 2020<br> B. 2019<br> C. 2021<br> D. 2022
timofeeve [1]

it is a okkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

7 0
3 years ago
Read 2 more answers
Choose the correct definition for Conditional Statement A. Affects the sequential flow of control by executing different stateme
Sliva [168]

Answer:

A: Affects the sequential flow of control by executing different statements based on the value of a Boolean expression

Explanation

because the real definition is Definition. A conditional statement is a statement that can be written in the form “If P then Q,” where P and Q are sentences. For this conditional statement, P is called the hypothesis and Q is called the conclusion. Intuitively, “If P then Q” means that Q must be true whenever P is true. And A, explain that.

5 0
3 years ago
Read 2 more answers
When the "swen" virus infected someone's system, it made significant changes to the registry that caused it to be extremely diff
Effectus [21]
<span>In certain cases, when the Swen executable is removed or renamed by an anti virus program without stopping to fix the registry, it then will become impossible to run any executable files on the machine. This happens because windows will be unable to find the file that is associated with any executables on it's hard drive.</span>
7 0
3 years ago
Which column and row references are updated when you copy the formula: =F$5+12?
KIM [24]

Answer:

Column F and row 5

7 0
3 years ago
Other questions:
  • What is the purpose of the chart feature in word?
    15·1 answer
  • Lisa wants to send an email with some confidential Information. Which of these options would work best for her?
    6·1 answer
  • Given the security levels TOP SECRET, SECRET, CONFIDENTIAL, and UNCLASSIFIED (ordered from highest to lowest), and the categorie
    13·1 answer
  • \What will the weather most likely be like the day after a warm front? (4 points) The temperature will be cool or cold, and ther
    7·2 answers
  • How does this app work?
    11·2 answers
  • When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
    11·2 answers
  • The used of PPE in the shop includes the following, except:
    10·2 answers
  • A label control may be added to a form by double-clicking on the Label control icon in the ________ window.
    15·1 answer
  • Consider the following code segment.
    10·1 answer
  • Use Spreadsheet Functions and Formulas
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!