salamat po sir.. Mag episodr 10 na po ako... uuli uulit ko lage mga video niya po para ma maste ko po... At.. napakalinaw talaga yung tinuturo niyo dito😁👌
beginners po ako haha medyo iba yung code ko hehe string answer;
int lives = 3; while (lives > 0) { Console.WriteLine(lives); Console.Write("what is your name :"); answer = Console.ReadLine(); if (answer == "eunyl") { Console.WriteLine("correct answer"); break; } else lives--; }
Console.WriteLine("You have 3 lives "); Console.WriteLine(); Console.Write("9 x 9 = "); int ans = Convert.ToInt32(Console.ReadLine()); // not specified answer Console.WriteLine("_____________________ "); int sum = 81; if (ans == sum) Console.WriteLine(" You are correct _____________________"); Console.WriteLine(); while (ans != sum) { Console.WriteLine("You have 2 lives left"); Console.WriteLine(); Console.Write("9 x 9 = "); int y = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("_____________________"); Console.WriteLine(); if (y == sum) Console.WriteLine(" You are correct _____________________ "); Console.WriteLine(); break; while (ans != sum) { Console.WriteLine("You have 1 life left"); Console.WriteLine(); Console.Write("9 x 9 = "); int z = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("_____________________"); Console.WriteLine(); if (z == sum) Console.WriteLine(" You are correct _____________________"); break; Console.WriteLine(); while (ans != sum) { Console.WriteLine(); Console.WriteLine("GAME OVER"); break; } } }
good evening po idol sdpt.. ahh idol bakit po sa while loop dba po pag true yung if dapat hindi na nya irurun yung else.... bakit po nirun nya padin sana mapansin po salamat.
anlayo ng code ko pero its work naman nag loop muna then if else for the correct and wrong answer yung game over naman nag if ako sa variable ng while nung nakilala ko tong channel lumawak logic ko ansarap na mag code
Nagtry akong gumamit ng char[ ] array na walang laman kasi gusto ko user ang maglalagay. but nong naglalagay na ko kahit pasok pa sya sa container; palagi syang array out of bound. Gusto ko sana magprint ng 5 letter word tapos irereverse ko yung spelling nya. pano kaya yun? hehehe
Hello po first time po sa channel niyo❤️ ganda po ng mga vids niyo❤️ pwede po ba gawa po kayo ng content na Kung paano gumawa ng password na loop na kapag na enter mo palang po ung true password dun palang po titigil using c# po thank you po Godbless ❤️
using System; namespace WHILE__DO_WHILE__and_Break { class Program { static void Main(string[] args) {
Console.Write("Name to Search : "); string search = Console.ReadLine(); int a = 0; string[] names = {"Shane","Chat","John","Freja","KiKi"}; while (a < names.Length) { if (names[a].Equals(search, StringComparison.InvariantCultureIgnoreCase)) { Console.WriteLine("We Found " + names[a]); break; } else Console.WriteLine(names[a]); a++; } } } } Try mo ito.. Dito mag input naman yung User. Sana makatulong
Lods pls gawa kanaman video pano ka naging magaling na Programmer pinapanood kopo python tutorial nyo nasa ep3 napo ako idol🙏🙏🙏 btw 16yrs old din po ako idol gusto ko maging katulad mo😍
Ganto ginawa ko. int lives = 3; int questionNumber = 1; bool answeredCorrectly = false; while (lives > 0 && questionNumber 0) { Console.WriteLine("You have won a prize."); }
Console.WriteLine("Simple Question Game"); Console.WriteLine(""); bool ans = false; int life = 3; do { Console.WriteLine("What is 1+1?"); int answer = Convert.ToInt32(Console.ReadLine()); if (answer != 2) { life--; if (life == 0) { Console.WriteLine("Game Over!"); break; } } else { Console.WriteLine("You are correct!"); ans = true; } } while (ans == false);
salamat po sir.. Mag episodr 10 na po ako... uuli uulit ko lage mga video niya po para ma maste ko po... At.. napakalinaw talaga yung tinuturo niyo dito😁👌
thank you very much sir proud to as a muslim developer
Thank you po ang galing niyo dami ko natutunan
salamat boss laking tulong to sa amin mga baguhan.
ayown, first time ko di maka rinig ng "welcam to mah yochub chanil"
thanks po ng marami! new sub!
Thank you po! Galing niyo po mag explain. New subscriber here!
galing kuya!🤩Thank youuu!🙏🏻💜
beginners po ako haha medyo iba yung code ko hehe
string answer;
int lives = 3;
while (lives > 0)
{
Console.WriteLine(lives);
Console.Write("what is your name :");
answer = Console.ReadLine();
if (answer == "eunyl")
{
Console.WriteLine("correct answer");
break;
}
else lives--;
}
use . equals kasi string naman kinocompare mo and may kulang sa else statement
Hindi ko nagets yung sa challenge pero nagawa ko. nag nested while ako. ang haba ng code HAHAHAHHA
Console.WriteLine("You have 3 lives ");
Console.WriteLine();
Console.Write("9 x 9 = ");
int ans = Convert.ToInt32(Console.ReadLine()); // not specified answer
Console.WriteLine("_____________________
");
int sum = 81;
if (ans == sum) Console.WriteLine(" You are correct
_____________________");
Console.WriteLine();
while (ans != sum)
{
Console.WriteLine("You have 2 lives left");
Console.WriteLine();
Console.Write("9 x 9 = ");
int y = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("_____________________");
Console.WriteLine();
if (y == sum) Console.WriteLine(" You are correct
_____________________ ");
Console.WriteLine();
break;
while (ans != sum)
{
Console.WriteLine("You have 1 life left");
Console.WriteLine();
Console.Write("9 x 9 = ");
int z = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("_____________________");
Console.WriteLine();
if (z == sum) Console.WriteLine(" You are correct
_____________________"); break;
Console.WriteLine();
while (ans != sum)
{
Console.WriteLine();
Console.WriteLine("GAME OVER");
break;
}
}
}
SANA NOON KOPA NAHANAP TONG CHANNEL MO KUYA 🥰
Finally meron na 😁
good evening po idol sdpt..
ahh idol bakit po sa while loop dba po pag true yung if dapat hindi na nya irurun yung else.... bakit po nirun nya padin
sana mapansin po salamat.
Timestamps
00:00 - Intro
00:16 - Tutorial flow
00:54 - WHILE Loop (Explanation)
03:06 - WHILE Loop (Implementation)
08:12 - ITERATING Array (Explanation)
10:31 - ITERATING Array (Implementation)
13:36 - Array LENGTH (Explanation)
14:02 - Array LENGTH (Implementation)
20:51 - BREAK Keyword (Explanation)
21:25 - BREAK Keyword & WHILE Loop (Implementation)
23:36 - CONDITIONS in WHILE loop (Explanation)
25:15 - CONDITIONS in WHILE loop (Implementation)
29:30 - QUIZ Game w/ Lives (Challenge)
30:36 - QUIZ Game w/ Lives (Solution)
35:53 - Outro
anlayo ng code ko pero its work naman
nag loop muna then if else for the correct and wrong answer yung game over naman nag if ako sa variable ng while
nung nakilala ko tong channel lumawak logic ko ansarap na mag code
HHAHAHAHAHA inabot ako ng 3 hours bago ko to magawa HAHAHAHHA y@wa
Keep up po.🥳🥳, God bless
Sa h
Phone po walang auto break tuloy tuloy siya mag run ng code
Galing!
Nagtry akong gumamit ng char[ ] array na walang laman kasi gusto ko user ang maglalagay. but nong naglalagay na ko kahit pasok pa sya sa container; palagi syang array out of bound. Gusto ko sana magprint ng 5 letter word tapos irereverse ko yung spelling nya. pano kaya yun? hehehe
Hello po first time po sa channel niyo❤️ ganda po ng mga vids niyo❤️ pwede po ba gawa po kayo ng content na Kung paano gumawa ng password na loop na kapag na enter mo palang po ung true password dun palang po titigil using c# po thank you po Godbless ❤️
looking for more C# tut vid mo sir :)
thank you poooooo🥺
Paano kung may 5 question magkakaiba tapos mali agad tatlong beses magkasunod paano mag stop yung questioning?
angas nung challenge nagawa korin
You have better, explanation.
Lods last question🙏 anong level mo sa pagiging I.T
Junior, mid, senior, professional?
sana gumawa din kayu nung mismong code na para copy san kasai di nmn gimagana mga example
using System;
namespace WHILE__DO_WHILE__and_Break
{
class Program
{
static void Main(string[] args)
{
Console.Write("Name to Search : ");
string search = Console.ReadLine();
int a = 0;
string[] names = {"Shane","Chat","John","Freja","KiKi"};
while (a < names.Length)
{
if (names[a].Equals(search, StringComparison.InvariantCultureIgnoreCase))
{
Console.WriteLine("We Found " + names[a]);
break;
}
else Console.WriteLine(names[a]);
a++;
}
}
}
}
Try mo ito.. Dito mag input naman yung User. Sana makatulong
int lives = 5;
string CorrectAnswer = "Lapu Lapu";
Console.Write("Sino ang pumatay kay magellan? ");
string question = Console.ReadLine();
while (question != CorrectAnswer)
{
lives--;
Console.WriteLine("Wrong answer!Current Lives: " + lives);
Console.Write("Sino ang pumatay kay magellan? ");
question = Console.ReadLine();
if (lives < 1)
{
Console.WriteLine("You Lose!");
break;
}
else if (question == CorrectAnswer)
{
Console.WriteLine("You win!");
}
else
{
Console.WriteLine("Invalid Input");
} okay lang ba to
paano naman po pag galing database yung string or mga names
Sir saan ko po makikita yunh advance c# video nyo salaamat
I need more examples to learn moreee knowledge
lods walang continuation ung C# tutorial #21?
hello po pano po mag pyramid using do while loop
Lodi pwede mag tanong, Anong edad ka nag start matuto nang programming?
Sana ma notice mo lodi😍😘
16 Years Old po ^_^
Wow
Lods pls gawa kanaman video pano ka naging magaling na Programmer pinapanood kopo python tutorial nyo nasa ep3 napo ako idol🙏🙏🙏 btw 16yrs old din po ako idol gusto ko maging katulad mo😍
int lives = 3;
string answer;
string correctanswer = "jye";
while (lives > 0)
{
Console.WriteLine("Sino ang pinaka pogi sa balat ng lupa? ");
Console.WriteLine();
Console.Write("Answer : ");
answer = Console.ReadLine().ToLower();
if (answer == correctanswer)
{
Console.WriteLine("TAMA");
break;
}
else
lives--;
if (lives == 0)
{
Console.WriteLine("You have failed");
Console.WriteLine();
}
else if (lives == 1) {
Console.WriteLine("you 1 more life left");
Console.WriteLine();
}
else
Console.WriteLine("try again you have " + lives + "more lives left");
Console.WriteLine();
pa help po, paano pagsabayin yong while loop at if else statement? 😭
Ganto ginawa ko.
int lives = 3;
int questionNumber = 1;
bool answeredCorrectly = false;
while (lives > 0 && questionNumber 0)
{
Console.WriteLine("You have won a prize.");
}
mas maganda tagala pag may ARRAY nagiging maiksi
int guide = 0;
int lives = 3;
string[] ques = {"What ","Who ","why "};
string[] correctAnswer ={"jupiter","mars","venus"};
string[] answer = new string[3];
while (lives > 0)
{
Console.WriteLine("Life :" + lives);
Console.WriteLine();
Console.WriteLine(ques[guide]);
Console.WriteLine();
Console.Write("Answer : ");
answer[guide] = Console.ReadLine();
if (correctAnswer[guide].Equals(answer[guide])){
Console.WriteLine("Correct! ");
guide ++;
}
else lives --; guide ++;
}
Console.WriteLine();
Console.WriteLine("You Lost");
salamat sa turo mo idol
Console.WriteLine("Simple Question Game");
Console.WriteLine("");
bool ans = false;
int life = 3;
do {
Console.WriteLine("What is 1+1?");
int answer = Convert.ToInt32(Console.ReadLine());
if (answer != 2)
{
life--;
if (life == 0)
{
Console.WriteLine("Game Over!");
break;
}
}
else
{
Console.WriteLine("You are correct!");
ans = true;
}
} while (ans == false);
thank you poooooo🥺