C++ Programming Tutorial 39 - Do While Loop

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

This is my favorite so far.

#include <string>
#include <iostream>
// do while loop
int main()
{
std::string answer = "5head";
std::string guess;
int key = 3;
std::cout << "Guess my name! \n";
do
{
std::cout << "You have " << key << " tries! \n";
std::cin >> guess;
key --;
if(answer != guess)
{
std::cout << "Wrong Answer!\n";
}
}while(guess != answer && key > 0);
if(answer == guess)
{
std::cout << "You Won!";
}
else
{
std::cout << "You Lost!";
}
}

misterengineer
Автор

Another one down. Another one gone. Another one bites the dust!

guitarhax
Автор

thanks this helped, and your voice is like really conducive to programming lessons. Lol MAn i got the worst learning disorders and i can just listen to you man!

vipmember
Автор

I have a test tomorrow thanks for being here

george.p.p
Автор

hey with the while loop I tested it without the repetition above the while and only put it inside the while loop and it still worked

xKNGSDx
Автор

These videos are amazing; thanks for making and sharing them!

PunmasterSTP
Автор

What version you using bro by the way like your videos

shahzaibshahzad
Автор

Why he uses '' std:: '' instead of just using ''using namespace std'' ?

ekinarmandogan
Автор

I'm having a problem putting curly brackets on my code

Red-vwkr
Автор

yo claire really be calling during c++ tutorial 39 smh 🥲

theoutsider
join shbcf.ru