subject

Scrieţi un program c/c++ care citeşte de la tastatură un număr natural, n (n∈[2,102]), și alte numere naturale din intervalul [0,104]: cele n elemente ale unui tablou unidimensional, apoi două numere distincte x și y. programul modifică tabloul în memorie înlocuind cu valoarea lui y fiecare număr x din tabloul citit și cu valoarea lui x fiecare număr y din tabloul citit, celelalte elemente rămânând nemodificate. programul afişează apoi pe ecran elementele tabloului obținut, separate prin câte un spațiu, sau mesajul nemodificat dacă nu s-a realizat nicio modificare.
exemplu: pentru n=7, tabloul (0, 7, 0, 1, 0, 5, 1), x=0 și y=1
se obține tabloul (1, 7, 1, 0, 1, 5, 0).

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:10
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
You know the right answer?
Scrieţi un program c/c++ care citeşte de la tastatură un număr natural, n (n∈[2,102]), și alte numer...
Questions
question
Physics, 21.10.2020 20:01
question
Chemistry, 21.10.2020 20:01
question
Mathematics, 21.10.2020 20:01
question
History, 21.10.2020 20:01
question
Social Studies, 21.10.2020 20:01
question
Mathematics, 21.10.2020 20:01
question
Biology, 21.10.2020 20:01