Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Nguồn:https://madisonrep.org/
Xem Thêm Bài Viết Khác:https://madisonrep.org/cong-nghe
Facebook –
GitHub –
Google+ –
LinkedIn –
reddit –
Support –
thenewboston –
Twitter –
Nguồn:https://madisonrep.org/
Xem Thêm Bài Viết Khác:https://madisonrep.org/cong-nghe
How does it work?Is there any place where to learn to code for free?Fucking stupid Americans.
I've sqrt(water) my computer and it does not work anymore, please help
he said something weird at 1:29
sqrt and fabs
if you know what I mean.
use fabs( ) to find absolite value of float data type.
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?
awesome
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
this doesnt work on linux, any way to make it?
#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?
the command abs is in which library?
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?
You can just do this
int year1,year2,age;
Instead of
int year1;
int year2;
int age;
Danke danke Bucky
#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?
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);
I actually guessed 12.8 (not the full thing) for the square root, so that's great.
Hi Bucky, since you mentioned that puts and gets are better, why do you still use printf and scanf instead of gets and puts?
when i learn how old i am, i cant help but leave a tear
in your scanf why did you enter &year1 instead of just year(int variable)
Pow –> You have to punch your computer xD XD XD XD pls 😀
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.
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.