Комментарии:
When shall we use void main() compared to int main()?
ОтветитьGreat explanation and easy to understand. You should really consider to be a full time lecturer. I would love to be your student😁
ОтветитьHello, i am getting the concept now but for the while loop on reversed number i don't get well and this is due to some of the source codes declared example int lastDigit = number % 10; and number = number / 10;. can you explained better for while these. Thank you.
Ответитьthanks a lot . so so educative🤩 👌🏿
ОтветитьHi, Ms. code! I'm an aspiring game developer and am attempting to learn C++. Currently, I watch your vids, because they are the most up-to-date tutorials I can find and I find your way of teaching very comprehensible. I usually attempt to create the program right after you give the general discussion, and would like to know if my codes are passable.
int pin, input, attempts = 0;
cout << "Creat PIN: ";
cin >> pin;
attempts += 3;
system("CLS");
do {
cout << "Enter PIN: " << endl;
cout << attempts << " attempts left" << endl;
cin >> input;
attempts--;
system("CLS");
if (pin == input)
cout << "Account accessed";
} while (pin != input && attempts > 0);
if (attempts == 0)
cout << "Access Denied";
l'm just wonder... what do() will do if it won't have the while() inside...
ОтветитьI think this works better
do
{
cout<< "PIN: ";
cin >> pin;
if (pin == usersPin)
cout<<"LOADING......."<<endl;
else
errorCounter++;
}while( pin != usersPin && errorCounter < 5);
if( pin != usersPin)
cout<<"BLOCKED....."<<endl;
Very nice ! i love it
Ответитьinstead of:
if (errorCounter < 3) {
cout << "Loading..";
}
can we write:
if (errorCounter < 3 && usersPin == pin) {
cout << "Loading..";
}
This is a great video 📸.
How can i compute sinhz from this equation : z^(2k+1) /(2k+1)! =Sinhz on c++ 🧐
as usual interesting
ОтветитьWow thanks for this.
Ответитьthx a lot for this video. it cleared all my doubts.
ОтветитьHey Saldina. I have a question. i was trying to run do while loop in eclipse. and its showing error and not taking void main() instead asking for int main() while your code ran without any errors. i copid the same code as yours. what is happening?
ОтветитьI will express this the Java way:
while(watchingHerVideos == true){
try{
keepEyesOnTheCode();
}catch(Exception e){
System.out.println("I can't. She's too beautiful");
}
}
Hello am new here. Thanks for all. Please I need your assistance.
ОтветитьI love how she teaches really friendly smoothly and lovely she is better than our programming lecturer 🥰😍
Ответитьthanks, mam💕💖
Ответитьthanks
Ответить6,20 "and"👍😊
ОтветитьIn this program I assigned a pin for the user, Pin :1234 , I want the user to put the pin and the program creates memory, or assigns a memory when the program runs again, so the user does not need to enter the pin again
ОтветитьHey, if i wanted to add something that tracks the errorCounter value and links it to a cout<< "x attempts left"; How should i do it?
Ответитьthank you very much indeed ! it is so amazing tutorial
ОтветитьIS this true ?
int PIN = 1234,counter=0,x;
do {
cout << " Enter Your Pin :";
cin >> x;
if (PIN == x)
{
cout << "corect";
break;
}
counter++;
} while (counter <= 3 );
if (PIN != x)
{
cout << "Blocked";
}
I'm so thankful I found this channel, because it simple and clear to understand how they explain the program
ОтветитьHello guys, I have a logic question. I added 3 chances countdown user text in the code. Here is the code:
int main()
{
string userName;
int userPin = 55, pin, countError = 3;
cout << ":: OUTER HEAVEN MOTHER BASE ::\n\nEnter your username, please: ";
getline(cin, userName);
do {
cout << "\nEnter your PIN: ";
cin >> pin;
if (pin != userPin) {
countError--;
if (countError > 0)
cout << userName << ", you have " << countError << " remaining attempts." << endl;
}
} while (countError > 0 && pin != userPin);
if (countError > 0) {
cout << "\nWelcome to Outer Heaven Mother Base, " << userName << "! The page is loading..." << endl;
}
else {
cout << "\nYou have failed all 3 attempts, " << userName << ". Your account has been blocked." << endl;
}
// Clear Local Windows Debugger
system("pause>0");
}
-----------------------------------------------------------------------------
Despite it being right, I am not able to understand why a specific part of the IF is logic right.
if (pin != userPin) {
countError--;
// If I remove this part
if (countError > 0)
// If I remove this part
cout << userName << ", you have " << countError << " remaining attempts." << endl;
the text is going to say: "you have 0 remaining attempts" instead of skipping to \nYou have failed all 3 attempts, " << userName << ". Your account has been blocked".
Why do I need this part to avoid that message? My gosh, I hope my text doesn't are a mess! Thank you
I added the ability to choose your pin aswell as telling the user how many attempts they have left! These tutorials have been so useful and easy to learn from. Thanks you!
Ответитьİ did not get why we have not used curly brackets in if...else
ОтветитьBut how is 3<3 in the code instead of 3<=3?
ОтветитьComment for Algor
ОтветитьYou have such beautiful tits. Do you have onlyfans?
ОтветитьFun project! I might expand on this one later.
Ответитьcould we do this with for
ОтветитьWhy are you using void here not int?
ОтветитьHEYYYY never mind fixed it......🙃
ОтветитьThank you my C++ teacher.
ОтветитьWhen I type in else it throws an error even if I have typed in the code verbatim to yours, int userPin = 1234, pin, errorCounter = 0;
do{
cout << "PIN:";
cin >> pin;
if (pin != userPin)
errorCounter++;
} while (errorCounter< 3 && pin!= userPin );
if (errorCounter < 3);
cout << "Loading";
else
cout << "Blocked";
❤’u
ОтветитьWhy are you used here void main() function?
ОтветитьI noticed if I enter a letter or a symbol, the program immediately runs through the code asking to enter the pin, but doesn't allow a pin to be entered, then the program defaults to "Blocked". Is there a way to debug this? I was thinking of using another if statement
ОтветитьThanks I used this to upgrade my source code from the guessing game tutorial
Ответитьnice, continue learning with this good method
Ответить1
Ответить