Answer:
Explanation:
bonjour,
1 MB = 1 000 000 B (bytes)
4 MB = 4 000 000B
=> false
Salutations!
<span>Which is an example of fixed expense?
Rent is an example of fixed expense, It doesn't matter whether you sell a widget or produce thousand of them, you must still pay the rent in any </span><span>circumstances.
</span>
Hope I helped.
The process of Starting up a computer is referred to as booting
Answer:
The code is given below. Follow the question and the code definitions for better understanding.
Explanation:
#include<iostream>
#include<string>
using namespace std;
int main(){
string pastWord="";
string currentWord,nextWord;
int n,t;
int singleton=0;
int consecutive=0;
cout<<"Enter words. ('xxxxx' to exit):\n";
cin>>nextWord;
do{
currentWord=nextWord;
cin>>nextWord;
if ( (currentWord!=pastWord)&&(currentWord!=nextWord) )
singleton++;
else if((currentWord==pastWord)&&(currentWord!=nextWord))
consecutive++;
pastWord=currentWord;
}while(nextWord!="xxxxx");
n=singleton;
t=consecutive;
cout<<"There were "<<n<<" singletons and "<<t<<" consecutive repetitions.";
cin.get();
return 0;
}
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(); }