C arithmetic operators ➗

preview_player
Показать описание
C arithmetic operators tutorial example explained

#C #arithmetic #operators

// arithmetic operators

// + (addition)
// - (subtraction)
// * (multiplication)
// / (division)
// % (modulus)
// ++ increment
// -- decrement

int x = 5;
int y = 2;

// int z = x + y;
// int z = x - y;
// int z = x * y;
// float z = x / (float) y;
// int z = x % y;
// x++;
// y--;

printf("%d", x);
printf("%d", y);

return 0;
Рекомендации по теме
Комментарии
Автор

#include <stdio.h>

int main(){

// arithmetic operators

// + (addition)
// - (subtraction)
// * (multiplication)
// / (division)
// % (modulus)
// ++ increment
// -- decrement

int x = 5;
int y = 2;

// int z = x + y;
// int z = x - y;
// int z = x * y;
// float z = x / (float) y;
// int z = x % y;
// x++;
// y--;

printf("%d", x);
printf("%d", y);

return 0;
}

BroCodez
Автор

Random comment, excellent work, your voice is JUST right.

diesee
Автор

<*_> This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal. <_*>

piotrmazgaj
Автор

I learned a lot more here than I do in the Udemy tutorial 💯

philanisibanyoni
Автор

Hello bro I am back after a long time great to see you again

YTSHANKY
Автор

Printf("Thanks for the help my exam is today")

NightAndDaycoreRadio
Автор

to complete this video, need to make the difference between a++, ++a and make some examples👌

victorromeropena
Автор

Brother..Please complete C program language course🥰

tanjimriyad
Автор

Thank you, just for the algorithm, ;)

prumchhangsreng
Автор

hi thanks for your sessions and your effort i have problem to understand why these two code with two different results?


#include <stdio.h>

int main()
{

int i = 1;

printf("%d %d %d \n", ++i, i++, i);

return 0;
}



the result will be 3 1 3




but if i write it like that
#include <stdio.h>

int main()
{

int i = 1;


printf("%d \n", ++i);
printf("%d \n", i++);
printf("%d \n", i);

return 0;
}
the result will be

2
2
3

yassineldeeb
Автор

leaving a randome coment down below ;)

bower