Hey guys today we are going to talk about LOOP Statements specifically WHILE and DO WHILE Loop these statements are used to repeat a certain code block so we don’t have to type it over and over again.
C# Tutorial #9: WHILE & DO-WHILE Loop | BREAK | Visual Studio | Filipino | Tagalog
Language: C#
Series: C# Tutorial Tagalog
Timestamps
00:00 – Intro
2nd Channel
https://www.youtube.com/channel/UCrpgPZDwDehk4JUvYorp0Zg
Facebook Page
https://www.facebook.com/SDPTSolutionsOfficial/
Join SDPT Exclusive Members
https://www.youtube.com/channel/UCMDL68xgNqRqzin1rkh9WuQ/join
sana gumawa din kayu nung mismong code na para copy san kasai di nmn gimagana mga example
using System;
using System.Collections.Generic;
using System.IO.Pipes;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tutorial9
{
internal class Program
{
static void Main(string[] args)
{
int lives = 3;
int ans;
while (lives != 0)
{
Console.Write("What is 1+1? ");
ans = Convert.ToInt32(Console.ReadLine());
lives–;
if (ans != 2) Console.WriteLine("You only have " + lives + " try");
else if (ans == 2)
{
Console.WriteLine("Your answer is correct!");
break;
}
}
}
}
}
Sa h
Phone po walang auto break tuloy tuloy siya mag run ng code
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);
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
angas nung challenge nagawa korin
HHAHAHAHAHA inabot ako ng 3 hours bago ko to magawa HAHAHAHHA [email protected]
Sir saan ko po makikita yunh advance c# video nyo salaamat
Hindi ko nagets yung sa challenge pero nagawa ko. nag nested while ako. ang haba ng code HAHAHAHHA
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
paano naman po pag galing database yung string or mga names
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
ayown, first time ko di maka rinig ng "welcam to mah yochub chanil"
thanks po ng marami! new sub!
I need more examples to learn moreee knowledge
thank you very much sir proud to as a muslim developer
hello po pano po mag pyramid using do while loop
SANA NOON KOPA NAHANAP TONG CHANNEL MO KUYA 🥰
galing kuya!🤩Thank youuu!🙏🏻💜
if (month ==1 && day <=31)
{
switch (month)
{
case 1:
Console.Write("January "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==2 && day <=28)
{
switch (month)
{
case 2:
Console.Write("Febuary "); Console.Write(day+", "); Console.Write(year);
break;
}
}
else if (month ==3 && day <=31)
{
switch (month)
{
case 3:
Console.Write("March "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==4 && day <=30)
{
switch (month)
{
case 4:
Console.Write("April "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==5 && day <=31)
{
switch (month)
{
case 5:
Console.Write("May "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==6 && day <=31)
{
switch (month)
{
case 6:
Console.Write("June "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==7 && day <=30)
{
switch (month)
{
case 7:
Console.Write("July "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==8 && day <=31)
{
switch (month)
{
case 8:
Console.Write("August "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==9 && day <=30)
{
switch (month)
{
case 9:
Console.Write("September "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==10 && day <=31)
{
switch (month)
{
case 10:
Console.Write("October "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==11 && day <=30)
{
switch (month)
{
case 11:
Console.Write("November "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else if (month ==12 && day <=31)
{
switch (month)
{
case 12:
Console.Write("December "); Console.Write(day + ", "); Console.Write(year);
break;
}
}
else
{
Console.WriteLine("Invalid");
}
ang haba ng akin hahahahaha, salamat po sa Tutorial, nag start po ako mag araw kahapon
Thank you po! Galing niyo po mag explain. New subscriber here!
lods walang continuation ung C# tutorial #21?
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 🙂
Keep up po.🥳🥳, God bless
You have better, explanation.
thank you poooooo🥺
thank you poooooo🥺
Lods last question🙏 anong level mo sa pagiging I.T
Junior, mid, senior, professional?
Finally meron na 😁
Galing!
Lodi pwede mag tanong, Anong edad ka nag start matuto nang programming?
Sana ma notice mo lodi😍😘