Answers for "yes"

2

yes

yesn't your face
non't not your coding
Posted by: Guest on June-12-2020
0

yes

#include <iostream>
using namespace std;

//a numbers guessing game
int main()
{
	string answer = "";
	int guess_max = 100;
	int guess_min = 1;
	while (guess_min != guess_max) {
		cout << "Is the number you are thinking of less than "
			<< (guess_max + guess_min + 1) / 2 << "?\n";
		cin >> answer;
		if (answer == "y" || answer == "Y" || answer == "yes" || answer == "Yes")
			guess_max = (guess_max + guess_min) / 2;
		else if (answer == "n" || answer == "N" || answer == "no" || answer == "No")
			guess_min = (guess_max + guess_min + 1) / 2;
		else {
			cout << "Bad input!\n";
		}
	}
	cout << "The number you are thinking of is " << guess_min << endl;
}
Posted by: Guest on July-29-2021
0

yes

yea but no but yes
Posted by: Guest on April-24-2021
0

yes

(No)
Posted by: Guest on June-24-2020

Browse Popular Code Answers by Language