SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 305 Weeks Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 06 Nov 2017 My Price 10.00

All unique!”, otherwise display the message “Not all unique!”.

Could you please help me with this C++ question? Please use basic code

 

Write a program to ask the user to enter 6 numbers and store them into an integer array. Then examine the array, if the numbers in the array are all unique, display message “All unique!”, otherwise display the message “Not all unique!”.

Sample run 1:

enter a number: 1

enter a number: 87

enter a number: 3

enter a number: 19

enter a number: 56

enter a number: 777

All unique!

Sample run 2:

enter a number: 8

enter a number: 9

enter a number: 10

enter a number: 8

enter a number: 10

enter a number: 788

Not all unique!

Directions: Use the following program structure for your main.

int main() {

intmyArray[6];

// code to fill in the array from the user

// code to determine if all of the values are unique

return 0;

}

NOTE: DO NOT USE GLOBAL VARIABLES!!!!!

A global variable is a variable that is defined outside of any function

(including main). We don't cover them in this course because they are generally

a very bad idea. So, don't do this in your projects!

ALSO: DO NOT USE ANY ASPECT OF C++ WHICH IS NOT COVERED IN THIS COURSE. This includes libraries, etc.

Attachments:

Answers

(5)
Status NEW Posted 06 Nov 2017 11:11 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)