Building a Guessing Game | Tutorial 23

  Рет қаралды 10,157

Giraffe Academy

Giraffe Academy

Күн бұрын

Пікірлер: 16
@technosoid2821
@technosoid2821 5 жыл бұрын
The program can also be written as #include #include int main() { int correctguess=5,i,guessnumber,triesleft=3; printf("enter the correct number to win "); for(i=0;i
@manipurihunabopa
@manipurihunabopa Жыл бұрын
How and where can I see the codes used in an app that we're using frequently, for example like, Facebook, Google, Excel, Chess etc
@Blackilykat
@Blackilykat 3 жыл бұрын
I think how you made the guess count system the "outOfGuesses" should have been a boolean instead of an int
@SittnPurdy
@SittnPurdy 3 жыл бұрын
had trouble at first because my program wouldn't print out "Out of guesses" after purposely guessing incorrectly. anyway, how i fixed it is putting in }else{ outOfGuesses++; // instead of outOfGuesses ==1 } } if(outOfGuesses){ // instead of outOfGuesses==1 printf("Out of guesses"); just in case any of you were stuck on that like i was
@manuelaborda7749
@manuelaborda7749 2 жыл бұрын
thank you! your videos are so useful :)
@abirhasanarko1009
@abirhasanarko1009 3 жыл бұрын
I did it in just 15 lines: #include int main() { int secretNumber = 5; int guess; int guessLimit = 3; int guessCount = 0; while(secretNumber != guess && guessCount < guessLimit) { printf("Enter a number: "); scanf("%d", &guess); guessCount++; } if(secretNumber != guess) { printf("You Lose!"); } else { printf("You Win!"); } return 0; }
@kouetewillis9062
@kouetewillis9062 3 жыл бұрын
I created three game with C-codeblocks and I want to create an android app for it.Can I have some once help please ?
@preetikabra5737
@preetikabra5737 3 жыл бұрын
you have to learn dart,flutter and c# or java not from c
@ryantmar1
@ryantmar1 5 жыл бұрын
hello, i'm having some trouble with the code you wrote :( it is saying that variable 'guess' is used uninitialized whenever function'main' is called. Anyone have any idea how to fix this, i'm using 'gcc' to compile this stuff
@harshilkotamreddy
@harshilkotamreddy 4 жыл бұрын
You've probably figured this out already, but try setting guess to 0.
@shivendrakumartiwari3455
@shivendrakumartiwari3455 3 жыл бұрын
i tried creating mine without seeing his code. his code is short does the same work. #include #include int main() { int hidden_number = 5; int guess_number; int guess_count=0; int out_guess=0; while((guess_number != hidden_number)&& (guess_count
@gabehcuodsuoitneterp203
@gabehcuodsuoitneterp203 2 жыл бұрын
10:26 🤫😅
@sai-no2ck
@sai-no2ck Жыл бұрын
#include #include int main() { int secret = 1; int guess; int guesscount = 0; int guesslimit = 3; while(guess != secret && guesscount < guesslimit) { printf("Enter your gues: "); scanf("%d",&guess); guesscount++; } if(guess == secret) { printf("you won!"); } else if(guesscount >= guesslimit) { printf("out of Guesses!"); } return 0; }
@sai-no2ck
@sai-no2ck Жыл бұрын
Mike ! I have not used the outofguesses variable and still I was able to the guessinggame. I am not able to understand the significance of *outofguesses* variable. Please explain!
For Loops | C | Tutorial 24
9:14
Giraffe Academy
Рет қаралды 11 М.
Building a Guessing Game | C++ | Tutorial 21
10:45
Giraffe Academy
Рет қаралды 39 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Number Guessing Game | C Programming Example
4:35
Portfolio Courses
Рет қаралды 10 М.
Building a Better Calculator | C | Tutorial 19
8:00
Giraffe Academy
Рет қаралды 12 М.
Building a Mad Libs Game | C | Tutorial 14
9:07
Giraffe Academy
Рет қаралды 12 М.
Guess the Number Game | C Programming Tutorial
11:19
LearningLad
Рет қаралды 30 М.
Writing Files | C | Tutorial 29
9:35
Giraffe Academy
Рет қаралды 22 М.
Getting User Input | C | Tutorial 12
12:15
Giraffe Academy
Рет қаралды 43 М.
C Program to Generate Random Numbers with in a Range of values
7:04
Programming Languages DON'T MATTER | Let's Rant!
10:05
Giraffe Academy
Рет қаралды 44 М.
Structs | C | Tutorial 21
8:36
Giraffe Academy
Рет қаралды 36 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 765 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН