subject

Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a for-end loop the program examines each element of the vector. If the element is positive, its value is doubled. If the element is negative, its value is tripled. The program displays the vector that was entered and the modified vector. Execute the program, and when the program ask the user to input a vector type randi([-10 20],1,19). This creates a 19-element vector with random integers between –10 and 20. g

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:30
The total revenues for a company are $150,223 and the total expenses were 125,766. if you are calculating the net income, which of these spreadsheets would you use? insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2-b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2+b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2/b3. the formula should be showing in the formula bar. insert a spreadsheet with $150,223 in cell b2 and 125, 766 in cell b3. enter a formula =b2*b3. the formula should be showing in the formula bar.
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
This program should be a short piece of code that prints all of the positive integers from 1 to 100 as described more fully below. the program may contain multiple methods, and if using an oo language, should be contained within a single class or object. the program should be designed so that it begins execution when invoked through whichever mechanism is most common for the implementation language. Γ’β€“ΕŸ print out all positive integers from 1 to 100, inclusive and in order. Γ’β€“ΕŸ print messages to standard output, matching the sample output below. Γ’β€“ΕŸ in the output, state whether the each integer is 'odd' or 'even' in the output. Γ’β€“ΕŸ if the number is divisible by three, instead of stating that the number is odd or even, state that the number is 'divisible by three'. Γ’β€“ΕŸ if the number is divisible by both two and three, instead of saying that the number is odd, even or divisible by three; state that the number is 'divisible by two and three'. Γ’β€“ΕŸ design the logic of the loop to be as efficient as possible, using the minimal number of operations to perform the required logic. sample output the number '1' is odd. the number '2' is even. the number '3' is divisible by three. the number '6' is divisible by two and three.
Answers: 1
You know the right answer?
Write a program that asks the user to input a vector of integers of arbitrary length. Then, using a...
Questions
question
Mathematics, 30.10.2020 16:00
question
Mathematics, 30.10.2020 16:00
question
Mathematics, 30.10.2020 16:00
question
Arts, 30.10.2020 16:00
question
Geography, 30.10.2020 16:00
question
Mathematics, 30.10.2020 16:00
question
Mathematics, 30.10.2020 16:00
question
Mathematics, 30.10.2020 16:00
Questions on the website: 13722360