24 Comments

Mister Slovenia

January 24, 2020

How does it work?Is there any place where to learn to code for free?Fucking stupid Americans.

Reply

Lluís Mª Bosch

January 24, 2020

I've sqrt(water) my computer and it does not work anymore, please help

Reply

Alex Shepler

January 24, 2020

he said something weird at 1:29

Reply

Osama Gamal

January 24, 2020

sqrt and fabs
if you know what I mean.

Reply

AJay Gupta

January 24, 2020

use fabs( ) to find absolite value of float data type.

Reply

Sabre Mase

January 24, 2020

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?

Reply

Star_ Media

January 24, 2020

awesome

Reply

Shadow Meth

January 24, 2020

Is abs function some thing like this? :
int abs(int number)
{
return number * (-1);
}

Reply

Stamvid

January 24, 2020

Oh wow 0 dislikes on a 50k video, i have never seen that before :O

Reply

G G

January 24, 2020

this doesnt work on linux, any way to make it?

Reply

a j

January 24, 2020

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <math.h>

int main()
{
int age= -333;

printf(" %d", &age);

age=abs(age);
printf(" %d", age);

return 0;
}

can you tell me why I have 2686748 333 ?
%d should match with & age right?

Reply

ZoRo

January 24, 2020

the command abs is in which library?

Reply

koren gershoni

January 24, 2020

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?

Reply

Abdulnaser Sheikh

January 24, 2020

You can just do this
int year1,year2,age;
Instead of
int year1;
int year2;
int age;

Reply

yerrapotu kiran

January 24, 2020

Danke danke Bucky

Reply

ganesh vicky

January 24, 2020

#include <stdio.h>
#include <stdlib.h>
#include<math.h>

int main()
{
printf("%fn", pow(64,1/3));
return 0;
}

The result of the above program is always 1. But here im trying to find the cubic root of 64
can anyone help me out?

Reply

Kevin Verdhi

January 24, 2020

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);

Reply

Aetricity

January 24, 2020

I actually guessed 12.8 (not the full thing) for the square root, so that's great.

Reply

Isabelle Ortiz

January 24, 2020

Hi Bucky, since you mentioned that puts and gets are better, why do you still use printf and scanf instead of gets and puts?

Reply

Merser

January 24, 2020

when i learn how old i am, i cant help but leave a tear

Reply

ankur patel

January 24, 2020

in your scanf why did you enter &year1 instead of just year(int variable)

Reply

Count Duncan

January 24, 2020

Pow –> You have to punch your computer xD XD XD XD pls 😀

Reply

Nichannick

January 24, 2020

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.

Reply

LunarFlare

January 24, 2020

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.

Reply

Leave a Reply