subject

Using a conditional expression, write a statement that increments numUsers if updateDirection is 1, otherwise decrements numUsers. Ex: if numUsers is 8 and updateDirection is 1, numUsers becomes 9; if updateDirection is 0, numUsers becomes 7. Hint: Start with "numUsers = ...".#include using namespace std;int main() {int numUsers;int updateDirection;numUsers = 8;updateDirection = 1;/ Your solution goes here /cout << "New value is: " << numUsers << endl;return 0;}numUsers = (updateDirection ==1)?(++numUsers):(--numUsers);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 23.06.2019 05:00
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
You know the right answer?
Using a conditional expression, write a statement that increments numUsers if updateDirection is 1,...
Questions
question
Mathematics, 31.01.2021 18:20
question
Computers and Technology, 31.01.2021 18:20
question
Mathematics, 31.01.2021 18:20
question
Mathematics, 31.01.2021 18:20
question
Biology, 31.01.2021 18:20