Answer:
The answer is "Option A".
Explanation:
In the given code an integer array "x" is defined, that stores some elements and another integer variable "a" is declared, that holds a value that is "10". In this code a conditional statement is defined, which checks array element value, in if block element of array that position is 2 is greater then the element of array that position is 5.if this condition is true, so variable a value is change that is equal to 5. In else block if the above condition is not true so the value of a variable is equal to 8, and another options is wrong that can be described as follows:
- In option B, The given condition is not false, that's why it is not correct.
- In option C, The value of variable a is changed when condition is true or false, that's why it is not correct.
- In option D, It is wrong because we can compare array elements.
Answer:
Please check the explanation
Explanation:
That's the code and it is done with the program in c++ according to instructions given in the question using binary search. It can guess the correct number in 10 or fewer attempts and also shows the number of attempts it took to guess the number.
#include <iostream> using namespace std; int guess() { string input; int l = 1, h = 1000; int mid = (l + h) / 2, count = 0; while (1) { //count the number of attemts to guess the number ++count; //cout << count << "\n"; cout << "\n"; cout << "Is " << mid << " correct? (y/n): "; cin >> input; //if input is y print the guessed no. and return if (input == "y") { cout << mid << " guessed in " << count << " attempts!\n"; return 1; } //if input is n ask the user if it's higher or lower than current guess if (input == "n") { cout << "Is the number greater than or less than the number ? (h/l): "; cin >> input; } //if input is higher assign mid incremented by 1 to low //else decrement mid by 1 and assign to high if (input == "h") l = mid + 1; else h = mid - 1; //calculate mid again according to input by user again mid = (l + h) / 2; } } int main() { cout << "****WELCOME TO THE GUESS THE NUMBER GAME!****\n"; cout << "Guess any number between 1 to 1000.\n"; cout << "This game depends on user giving correct answers and not changing their number middle of game.\n"; guess(); }
Answers:
1. JavaScript is a very well-known computer dynamic language.
2. 09/55
3. Option C
JavaScript is the most popular computer dynamic language.
It was invented in the September of 1955.
The option best describing it is the most popular dynamic computing language.
Hope this answer helps you!
Answer:
Following are the statement is False
Explanation:
Because in the organizations there are the following computer components and software are managed by that person who is professional in the Information Technology department and IT administrator so this comes under IT management.
So, That's why the following statement is False.
Answer:
please write in english i cannot understand
Explanation: