Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts
Amazon Auto Links: No products found.
this doesnt work on linux, any way to make it?
You can just do this
int year1,year2,age;
Instead of
int year1;
int year2;
int age;
in your scanf why did you enter &year1 instead of just year(int variable)
awesome
Pow –> You have to punch your computer xD XD XD XD pls 😀
int diceRoll1, diceRoll2, diceRoll3;
int firstSum, SecondSum;
char guess;
diceRoll1 = ( rand()%6 ) + 1;
diceRoll2 = ( rand()%6 ) + 1;
diceRoll3 = ( rand()%6 ) + 1;
firstSum = diceRoll1 + diceRoll2 + diceRoll3;
printf(“First sum of dices: %d n”, firstSum);
puts(“do you think the next sum will be lower/same/higher? (L,S,H)”);
scanf(” %c”, &guess);
diceRoll1 = ( rand()%6 ) + 1;
diceRoll2 = ( rand()%6 ) + 1;
diceRoll3 = ( rand()%6 ) + 1;
SecondSum = diceRoll1 + diceRoll2 + diceRoll3;
printf(“second sum of dices: %d n”, SecondSum);
if(guess == ‘L’ && firstSum > SecondSum) puts(“Your rock!”);
else if(guess == ‘S’ && firstSum == SecondSum) puts(“Your Rock!”);
else if(guess == ‘H’ && firstSum < SecondSum) puts("Your rock!"); else printf("Your Sucks!"); return 0; how is that?
So when I enter this the way you have it shown here. I get errors saying “variable year1, (and year2 and age) are not initialized. I can easily fix it by making year1, year2 & age = 0 but why do i have to do that?
when i learn how old i am, i cant help but leave a tear
Or u could just use
int age1 = year1 – year2
int age2 = year2 – year1
if(year1>year2){
printf(“%d n , age1);
}else{
printf(“%d n, age2);
use *fabs( )* to find absolite value of float data type.
what if i want different sqrt , like third sqrt from number 8 is 2 if you know what i mean . How do i specify it ? because by default its always just basic sqrt.
Danke danke Bucky
he said something weird at 1:29
I’ve sqrt(water) my computer and it does not work anymore, please help
the command abs is in which library?
How does it work?Is there any place where to learn to code for free?Fucking stupid Americans.
#include
#include
#include
#include
#include
Bucky you should check out CodeLite. It’s my preferred C++ editor. It should work for C since they share the same compiler I believe.
Hi Bucky, since you mentioned that puts and gets are better, why do you still use printf and scanf instead of gets and puts?
Is abs function some thing like this? :
int abs(int number)
{
return number * (-1);
}
Oh wow 0 dislikes on a 50k video, i have never seen that before :O
sqrt and fabs
if you know what I mean.
I actually guessed 12.8 (not the full thing) for the square root, so that’s great.
#include
#include
#include